ProtonVPN / protonvpn-cli

Legacy protonvpn-cli: ProtonVPN Command-Line Tool for Linux and macOS. This has been superseded by https://github.com/ProtonVPN/protonvpn-cli-ng
Other
607 stars 98 forks source link

fix --update bug because protonvpn-cli path may not be /usr/local/bin… #194

Closed alexandre1985 closed 4 years ago

alexandre1985 commented 4 years ago

The --update flag was not working on my system. I also tried do --install then --update on protonvpn-cli but still gave the the same error:

[!] Error: protonvpn-cli does not seem to be installed.

This happened because protonvpn-cli may not be on the hard-coded path of "/usr/local/bin/protonvpn-cli". This assumption (that was on the script) may be wrong.

So, this fixes this issue and gives the ability for protonvpn-cli script to reside in any directory. In my opinion, this is the correct behaviour for protonvpn-cli.

alexandre1985 commented 4 years ago

This bug can be reproduced if, for example, you have:

$ PATH=/home/johndoe/scripts:/usr/local/bin:/usr/bin
$ which protonvpn-cli
/home/johndoe/scripts/protonvpn-cli
$ protonvpn-cli --update
Tamaranch commented 4 years ago

There is no bug, protonvpn-cli is not supposed to be moved. You should have made a ln -s /usr/local/bin/protonvpn-cli /home/johndoe/scripts instead. The choice of the installation directory could be given to the user, but that's another PR…

alexandre1985 commented 4 years ago

Alright. I understand. I'm gonna close this pull request.

Tamaranch commented 4 years ago

Well, this is just my opinion, I'm not the maintainer here. Maybe you should wait for a review by @kaplun

alexandre1985 commented 4 years ago

I cannot Reopen (don't know why). @kaplun please give some feedback