Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh: Support tilde in prefix #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soreau
Copy link
Member

@soreau soreau commented Dec 11, 2020

Without this, the script tries to use sudo for paths owned by user.

Without this, the script tries to use sudo for paths owned by user.
@SuzanneSoy
Copy link
Contributor

SuzanneSoy commented Mar 8, 2021

Using eval like this is is dangerous, it will not only expand the ~ but also $(…), backquotes and probably some other characters.

This post seems to suggest a safer way (search-and-replace a leading ~ with the value of $HOME):

PREFIX="${PREFIX/#\~/$HOME}"

@soreau
Copy link
Member Author

soreau commented Mar 8, 2021

Using eval like this is is dangerous, it will not only expand the ~ but also $(…), backquotes and probably some other characters.

This post seems to suggest a safer way (search-and-replace a leading ~ with the value of $HOME):

PREFIX="${PREFIX/#\~/$HOME}"

Ah thanks, I'll have to update the PR. 👍

@SuzanneSoy
Copy link
Contributor

No need, I already made #26 which does just this :)

@SuzanneSoy
Copy link
Contributor

I'm busy right now but I'm making a note update this to fix the conflicts this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants