Merge pull request #127540 from NixOS/backport-127284-to-release-21.05

[Backport release-21.05] nixos-rebuild: fix --use-remote-sudo
This commit is contained in:
Michele Guerini Rocco 2021-06-22 09:49:19 +02:00 committed by GitHub
commit 20d353f649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ buildHostCmd() {
if [ -z "$buildHost" ]; then
"$@"
elif [ -n "$remoteNix" ]; then
ssh $SSHOPTS "$buildHost" env PATH="$remoteNix":'$PATH' "${maybeSudo[@]}" "$@"
ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" env PATH="$remoteNix":'$PATH' "$@"
else
ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" "$@"
fi