1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 16:27:03 +00:00

power: echo to print in error messages

Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
This commit is contained in:
gnammix 2024-12-31 14:38:42 +01:00 committed by GitHub
parent 62d8f5f289
commit 492a72007a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -312,8 +312,8 @@ let
# some mac devices, notably notebook do not support restartAfterPowerFailure option
restartAfterPowerFailureIsSupported = ''
if sudo /usr/sbin/systemsetup -getRestartPowerFailure | grep -q "Not supported"; then
echo "error: Your system do not support the restartAfterPowerFailure feature" >&2
echo "Please ensure that power.restartAfterPowerFailure is not set." >&2
printf >&2 "<EFBFBD>[1;31merror: restarting after power failure is not supported on your machine<EFBFBD>[0m\n" >&2
printf >&2 "Please ensure that `power.restartAfterPowerFailure` is not set.\n" >&2
exit 2
fi
'';