nixos-rebuild: fix systemd-run hanging over SSH

This commit is contained in:
Michael Hoang 2023-12-30 17:02:15 +11:00
parent 09fd207cb8
commit cd61094234

View file

@ -750,7 +750,7 @@ if [[ "$action" = switch || "$action" = boot || "$action" = test || "$action" =
if [[ -n "$NIXOS_SWITCH_USE_DIRTY_ENV" ]]; then
log "warning: skipping systemd-run since NIXOS_SWITCH_USE_DIRTY_ENV is set. This environment variable will be ignored in the future"
cmd=()
elif ! targetHostSudoCmd "${cmd[@]}" true &>/dev/null; then
elif ! targetHostSudoCmd "${cmd[@]}" true; then
logVerbose "Skipping systemd-run to switch configuration since it is not working in target host."
cmd=(
"env"