jorgebucaran / fisher

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

Fisher not working behind proxy #692

Closed zbindenren closed 2 years ago

zbindenren commented 2 years ago

Hi

At on a system of mine fisher does not work, but if I execute the related commands manually it works:

❯ fisher install jethrokuan/fzf
fisher install version 4.3.0
Fetching https://codeload.github.com/jethrokuan/fzf/tar.gz/HEAD
fisher: Invalid plugin name or host unavailable: "jethrokuan/fzf"

user on hostname ~ 
[🔴 ERROR] ❯ set temp (command mktemp -d)

user on hostname ~ 
❯ set url https://codeload.github.com/jethrokuan/fzf/tar.gz/HEAD

user on hostname ~ 
❯ curl --silent $url | tar -xzC $temp -f -

user on hostname ~ 
❯ 

In your script you prefix $url and $temp with \. If I do that it does not work. Releated script:

if curl --silent \$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
jorgebucaran commented 2 years ago

Hey @zbindenren, thanks. Think you can send us a PR with this fix?

jorgebucaran commented 2 years ago

Ping @zbindenren 👋

zbindenren commented 2 years ago

Sorry for the late answer. I can create a PR with the \ removed. But I wonder why they are there in the firstplace (I am not a fish specialist).

jorgebucaran commented 2 years ago

Escaping, since that code is inside double quotes.

zbindenren commented 2 years ago

It was a proxy missconfiguration. To debug I had to remove --silent. It is working now.

jorgebucaran commented 2 years ago

Good to know! Thanks, @zbindenren.