xtendo-org / chips

A fast, lightweight, and concurrent plugin manager for the fish shell, written in Haskell
73 stars 3 forks source link

It shows login prompt when wrong repo name is in the config. #7

Open xnuk opened 8 years ago

xnuk commented 8 years ago

Screenshot contains dirty login shell with chips

xtendo-org commented 8 years ago

Thank you very much for a valuable bug report!

I guess this happens because when the repository name is not available, there is a chance that it is a private repository (therefore not publicly visible), so GitHub lets you authenticate first.

A quick thought gives me a crude solution: when installing new plugins, first curl the URL, and proceed to git clone only when the curl result isn't 404. But this requires an additional round trip to the GitHub server, slowing down the whole process.

Another quick and dirty solution would be to read stdout of git clone, and if it begins with Username for 'https://github.com':, consider it a fail. This is obviously not a "Do the Right Thing" approach, but it will work for a while (until we come up with a better solution).

xnuk commented 8 years ago

Setting GIT_TERMINAL_PROMPT=0 may help this.