mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos-rebuild: use remote $PATH in buildHostCmd
this fixes the issue when using nixos-rebuild switch --target-host <target> --use-remote-sudo when the local machine does not have anything in `$PATH` that would resolve to `sudo` on the remote machine. the single quotes prevent expansion of `$PATH` on the local machine, such that the remote machine's value of that variable is used.
This commit is contained in:
parent
707bb2712e
commit
283eaaff3e
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ buildHostCmd() {
|
|||
if [ -z "$buildHost" ]; then
|
||||
"$@"
|
||||
elif [ -n "$remoteNix" ]; then
|
||||
ssh $SSHOPTS "$buildHost" env PATH="$remoteNix:$PATH" "${maybeSudo[@]}" "$@"
|
||||
ssh $SSHOPTS "$buildHost" env PATH="$remoteNix":'$PATH' "${maybeSudo[@]}" "$@"
|
||||
else
|
||||
ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue