jorgebucaran / fisher

A plugin manager for Fish
https://git.io/fisher
MIT License
7.53k stars 257 forks source link

Error Message When Installing Fisher #711

Closed swardana closed 2 years ago

swardana commented 2 years ago

I have installed fisher 4.3.1 following the step in the README.md section. There is a error message showing on my terminal, but fisher is still successfully installed on my machine.

fisher install version 4.3.1
fish: Unknown command: fish
- (line 81): 
                fish --command "
                    if test -e $plugin
                        command cp -Rf $plugin/* $source
                    else
                        set temp (command mktemp -d)
                        set name (string split \@ $plugin) || set name[2] HEAD
                        set url https://api.github.com/repos/\$name[1]/tarball/\$name[2]
                        set header 'Accept: application/vnd.github.v3+json'

                        echo Fetching (set_color --underline)\$url(set_color normal)

                        if curl --silent -L -H \$header \$url | tar -xzC \$temp -f - 2>/dev/null
                            command cp -Rf \$temp/*/* $source
                        else
                            echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
                            command rm -rf $source
                        end
                        command rm -rf \$temp
                    end

                    set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
                " &
                ^
in function 'fisher' with arguments 'install jorgebucaran/fisher'
Installing jorgebucaran/fisher
Installed 1 plugin/s

This is how I install fish

curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher

Any advise why the error message showing?

jorgebucaran commented 2 years ago

Are you using Fish or bash?

swardana commented 2 years ago

I'm using Fish already.

jorgebucaran commented 2 years ago

What version of Fish are you on? Did you run the code above from Fish or bash?

swardana commented 2 years ago

Hi @jorgebucaran I'm running the scripts from Fish. This is my environment:

fish -v
fish, version 3.4.1

I'm using MacOS

ProductName:    macOS
ProductVersion: 11.6.5
BuildVersion:   20G527

Using MacOS terminal Version 2.11 (440)

jorgebucaran commented 2 years ago

Thanks, I see. Just to be completely sure, is Fish in your $PATH?

twosevenska commented 2 years ago

Was having the same issue and I had to run these commands after installing Fish via Brew to get the fisher installation script working:

https://gist.github.com/gagarine/cf3f65f9be6aa0e105b184376f765262

Take special attention to the last command: set -U fish_user_paths /opt/homebrew/bin $fish_user_paths

jorgebucaran commented 2 years ago

Thank you for sharing, @twosevenska. 🙌