Fish error every time I activate default environment

I installed the flox deb on Ubuntu 22.04. My default shell is fish (3.3.1).

Steps to reproduce:

  • cd $HOME
  • flox init
  • flox activate

What should happen:

✅ You are now using the environment 'default'.

What happens instead:

✅ You are now using the environment 'default'.
To stop using this environment, type 'exit'

~/.flox/run/x86_64-linux.default/activate.d/fish (line 17): 'return' outside of function definition
  return 1
  ^
from sourcing file ~/.flox/run/x86_64-linux.default/activate.d/fish
source: Error while reading file “/home/user/.flox/run/x86_64-linux.default/activate.d/fish”

This happens every time I try to activate the environment.

any chance you can upgrade to fish 3.7.1?

Apparently I can! I will give that a go and report back.

1 Like

Confirmed that with fish 3.7.1 as my default system shell, I can now flox init; flox activate without error!

1 Like

So great to hear!

We’re working on fixing the support for older versions as well! Flox failing when using fish shell · Issue #2016 · flox/flox · GitHub

1 Like