Skip to content

Commit 04aa71f

Browse files
fix(fish): activate mise on Linux, not just macOS/Homebrew
Mise activation was gated on `uname = Darwin` and `$HOMEBREW_PREFIX/bin/mise`, so it silently did nothing in Linux containers. Switch to `command -q mise` which works wherever mise is installed.
1 parent 9470e8d commit 04aa71f

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

config/fish/config.fish

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,16 @@ else
1111
fish_add_path --global --prepend "$HOME/.cargo/bin"
1212
end
1313

14-
if [ (uname) = Darwin ]
15-
# setup version manager
16-
if [ -x "$HOMEBREW_PREFIX/bin/mise" ]
17-
# don't try to auto-install, so we things like the tide prompt don't trigger installations
18-
set -gx MISE_NOT_FOUND_AUTO_INSTALL false
14+
if command -q mise
15+
# don't try to auto-install, so we things like the tide prompt don't trigger installations
16+
set -gx MISE_NOT_FOUND_AUTO_INSTALL false
1917

20-
# show the ruby installation happening, since it can take awhile
21-
set -gx MISE_RUBY_VERBOSE_INSTALL true
18+
# show the ruby installation happening, since it can take awhile
19+
set -gx MISE_RUBY_VERBOSE_INSTALL true
2220

23-
set -gx MISE_NODE_COREPACK true
21+
set -gx MISE_NODE_COREPACK true
2422

25-
mise activate fish | source
26-
end
23+
mise activate fish | source
2724
end
2825
end
2926

0 commit comments

Comments
 (0)