Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos-rebuild: Fix target-host using fish #70734

Merged
merged 1 commit into from Oct 11, 2019

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Oct 8, 2019

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.

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.
@edolstra
Copy link
Member

Isn't FOO=bar command allowed by POSIX?

@edolstra
Copy link
Member

Also, why are we even messing with PATH? It seems less error-prone to call $remoteNix directly.

@jtojnar
Copy link
Contributor Author

jtojnar commented Oct 11, 2019

Fish is not POSIX-compatible.

Is there any requirement that ssh must use a POSIX shell for non-interactive cases? In that case we should probably fix users.defaultUserShell.

Calling $remoteNix/nix-copy-closure directly might work but it would require much wider rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants