Closed kendofriendo closed 2 years ago
Follow the instructions on https://brew.sh
I already installed brew and it's working properly on bash, but I'm still receiving this error.
@Kenney-G @vitor-mariano do you use linux by any chance? If yes: this plugin does only work on macOS as far as I can see.... there is another especially for brew on linux: https://github.com/oh-my-fish/plugin-linuxbrew, but this will only work if you did the brew installation https://docs.brew.sh/Homebrew-on-Linux only with the alternative method (.linuxbrew in your homefolder). For global installations (default method) it won't work either.... this plugin seems to be out-dated also https://github.com/oh-my-fish/plugin-brew/issues/8 has some more points why this should be updated.... even for macOS
for now I don't use the plugin and do something like:
# brew (check for default linux and macOS locations)
set -l possible_brew_paths /usr/local/bin /home/linuxbrew/.linuxbrew/bin
for possible_brew_path in $possible_brew_paths
if test -f $possible_brew_path/brew
eval ($possible_brew_path/brew shellenv)
end
end
in my init.fish since I work on linux as well as macOS...
I'm quite new to the fish world, maybe I'll find some time creating a pull request of some sort for this one....
I use Linux (Open-SUSE Tumbleweed) and WSL (Open-SUSE Leap).
The easiest solution I've found is to keep bash as your default shell, do the homebrew installation through bash, and add a command to change to fish as soon as you log in to your ~/.bashrc or~/ .profile. I just put fish
at the end of my ~/.profile and it works fine.
I don't really use homebrew anymore though. I just wanted it for a quick Ruby setup but SUSE comes with Ruby anyways.
But how?