You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I re-ran the latest install script to get the new scripts for Fish installed (#7014, #7040), but it looks like the script sourced by /etc/fish/conf.d/nix.fish crashes on my system's version of Fish.
Steps To Reproduce
Install (multi-user) Nix 2.11.1 with the usual sh <(curl -L https://nixos.org/nix/install) --daemon (I did this from within Fish so I ran sh (curl -L https://nixos.org/nix/install | psub) --daemon instead.)
Open a new terminal running Fish.
Error:
/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish (line 3): 'return' outside of function definition
return
^
from sourcing file /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
called on line 4 of file /etc/fish/conf.d/nix.fish
from sourcing file /etc/fish/conf.d/nix.fish
called on line 253 of file /usr/share/fish/config.fish
from sourcing file /usr/share/fish/config.fish
called during startup
.: Error while reading file “/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish”
(And nix-env etc. aren't available.)
Expected behavior
No error, and the right environment variables are loaded for Nix to work from Fish.
nix-env --version output
$ nix-env --version
nix-env (Nix) 2.11.1
(Ran from bash instead of fish.)
Additional context
$ fish --version
fish, version 3.3.1
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
The text was updated successfully, but these errors were encountered:
I'm guesing the problem is that older/newer versions of Fish than the one I'm using do allow return outside of functions, and that the fix is probably as simple as using exit instead.
isomorpheme
changed the title
Fish support script errors with "'return' outside of function definition'
Fish support script errors with 'return' outside of function definition'Oct 10, 2022
isomorpheme
changed the title
Fish support script errors with 'return' outside of function definition'
Fish support script errors with 'return' outside of function definitionOct 10, 2022
Describe the bug
I re-ran the latest install script to get the new scripts for Fish installed (#7014, #7040), but it looks like the script sourced by
/etc/fish/conf.d/nix.fish
crashes on my system's version of Fish.Steps To Reproduce
sh <(curl -L https://nixos.org/nix/install) --daemon
(I did this from within Fish so I ransh (curl -L https://nixos.org/nix/install | psub) --daemon
instead.)nix-env
etc. aren't available.)Expected behavior
No error, and the right environment variables are loaded for Nix to work from Fish.
nix-env --version
output(Ran from bash instead of fish.)
Additional context
The text was updated successfully, but these errors were encountered: