nixos-rebuild: fix --use-remote-sudo
Currently fails with: $ nixos-rebuild test --target-host myhost --use-remote-sudo building Nix... sudo: /run/current-system/sw/bin/sudo must be owned by uid 0 and have the setuid bit set It seems setting an explicit PATH in the ssh command overrides the remote setuid wrappers.
This commit is contained in:
parent
6a8843c758
commit
35a8d78e44
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,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
|
||||
|
|
Loading…
Reference in a new issue