Closed ykageyama-mondo closed 6 months ago
Thanks @ykageyama-mondo.
@praveenperera, opinion on this?
@cantino hmm this didn't use to need a sudo, maybe apple changed permissions on that folder.
Some linux users might not need sudo either. I think some people are little scared by piping into a sudo script.
Maybe a note on "if the current user doesn't have permissions to /usr/local/bin/
use sudo". Not sure I can see arguments for both sides, up to you.
@praveenperera Thanks for the feedback!
Good point about piping into sudo. It will definitely raise some red flags especially when executing remote scripts.
I can see benefits from adding a note for when users run into this error but it doesn't resolve the root issue and make installation seamless.
Another way I can see to solve this would be to update the installation command (or add an alternative method) to target a folder where elevated permissions are not needed. Maybe something like this:
curl -LSfs https://raw.githubusercontent.com/cantino/mcfly/master/ci/install.sh | sh -s -- --git cantino/mcfly --to $HOME/.local/bin
This has the tradeoff of only installing for the current user so I'm not sure if this is desirable.
What are your thoughts on this?
I think I like the suggestion of adding if the current user doesn't have permissions to '/usr/local/bin/', then use: curl -LSfs https://raw.githubusercontent.com/cantino/mcfly/master/ci/install.sh | sudo sh -s -- --git cantino/mcfly
Currently when trying to install via the installation script command in the README we fail with a permission denied.
This is due to the default installation location
/usr/local/bin
in theinstall.sh
. Adding sudo to the command will fix this issue.