Auto-upgrade: Abort on failure
This commit is contained in:
parent
8a29fc400b
commit
c14bc08deb
|
@ -118,8 +118,7 @@ in
|
|||
send_email=yes
|
||||
email_subject="Upgrade failed (exit code $exit_code)"
|
||||
email_body="The system upgrade started at $start_time has failed with exit code $exit_code."
|
||||
fi
|
||||
|
||||
else
|
||||
echo "→ Determining package differences." | tee -a "$output_file"
|
||||
installed_packages()
|
||||
{
|
||||
|
@ -174,6 +173,7 @@ in
|
|||
${nixos-rebuild} switch ${toString cfg.flags} 2>&1 | tee -a "$output_file" || exit_code=$?
|
||||
fi
|
||||
''}
|
||||
fi
|
||||
|
||||
upgrade_output="$(cat "$output_file")"
|
||||
rm -f "$output_file"
|
||||
|
|
Loading…
Reference in a new issue