nixos-rebuild: Fix target-host using fish
I have `users.defaultUserShell = pkgs.fish;` set on my server and when I ran `nixos-rebuild switch --target-host …`, the command failed with the following error: fish: Unsupported use of '='. To run 'nix-store' with a modified environment, please use 'env PATH=… nix-store…' That is because fish requires env to set environment variables for a program. It should also work on other shells.
This commit is contained in:
parent
2436c27541
commit
316d4faba4
|
@ -111,7 +111,7 @@ buildHostCmd() {
|
|||
if [ -z "$buildHost" ]; then
|
||||
"$@"
|
||||
elif [ -n "$remoteNix" ]; then
|
||||
ssh $SSHOPTS "$buildHost" PATH="$remoteNix:$PATH" "$@"
|
||||
ssh $SSHOPTS "$buildHost" env PATH="$remoteNix:$PATH" "$@"
|
||||
else
|
||||
ssh $SSHOPTS "$buildHost" "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue