From 492a72007ae2e7bd5895458fcd72ac2c8c9a0dc4 Mon Sep 17 00:00:00 2001 From: gnammix <71704832+gnammix@users.noreply.github.com> Date: Tue, 31 Dec 2024 14:38:42 +0100 Subject: [PATCH] power: echo to print in error messages Co-authored-by: Michael Hoang --- modules/system/checks.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/checks.nix b/modules/system/checks.nix index e6ee1b3..91622e5 100644 --- a/modules/system/checks.nix +++ b/modules/system/checks.nix @@ -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 "�[1;31merror: restarting after power failure is not supported on your machine�[0m\n" >&2 + printf >&2 "Please ensure that `power.restartAfterPowerFailure` is not set.\n" >&2 exit 2 fi '';