diff --git a/options/auto-upgrade.nix b/options/auto-upgrade.nix index d0f9829..0c84db4 100644 --- a/options/auto-upgrade.nix +++ b/options/auto-upgrade.nix @@ -165,7 +165,7 @@ in activate_configuration="no" # Check if any user sessions are open - active_users=$(users | tr ' ' '\n' | sort | uniq | grep -vE '^(${concatStringsSep "|" cfg.rebootIgnoreUsersActive})$') + active_users=$(users | tr ' ' '\n' | sort | uniq | grep -vE '^(${concatStringsSep "|" cfg.rebootIgnoreUsersActive})$' || true) if [ "$reboot_allowed" = "yes" ] && [ -n "$active_users" ] ; then reboot_allowed=no email_body="$(printf "%s\n%s\n%s" "$email_body" "The system cannot reboot since the following users are active:" "$active_users")"