scripts/deploy: fix invalid use of "failed" builtin
This commit is contained in:
@@ -252,14 +252,18 @@ proc deployOneHost (; host, variant) {
|
||||
switch | test {
|
||||
info "activating profile... "
|
||||
destructive runOnTarget "$netHost" sudo nix-env -p /nix/var/nix/profiles/system --set "$myStorePath"
|
||||
|
||||
try {
|
||||
destructive runOnTarget "$netHost" sudo "$myStorePath/bin/switch-to-configuration" "$action"
|
||||
}
|
||||
var fail = failed
|
||||
var fail = false
|
||||
if failed { setvar fail = true } # XXX: `failed` special variable is only readable via `if failed`
|
||||
|
||||
if (doReboot and (not fail or doRebootForce)) {
|
||||
info "rebooting $host"
|
||||
destructive runOnTarget "$netHost" sane-reboot "$host" || return 1
|
||||
}
|
||||
|
||||
if (fail) {
|
||||
false
|
||||
}
|
||||
|
Reference in New Issue
Block a user