-
Notifications
You must be signed in to change notification settings - Fork 122
Closes #279: use $CARGO_HOME as default location if defined #280
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for making this happen, it's much appreciated!
Once this is finalised I think the changes should also be contributed to the source of this copy for maximum impact.
if [ -z $dest ]; then | ||
dest="$HOME/.cargo/bin" | ||
if [ -z "$dest" ]; then | ||
dest="${CARGO_HOME:-$HOME/.cargo/bin}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem correct as per the definition of $CARGO_HOME
.
This seems more like it.
dest="${CARGO_HOME:-$HOME/.cargo/bin}" | |
dest="${CARGO_HOME:-$HOME/.cargo}/bin" |
What do you think?
@@ -16,7 +16,7 @@ Options: | |||
--crate NAME Name of the crate to install (default <repository name>) | |||
--tag TAG Tag (version) of the crate to install (default <latest release>) | |||
--target TARGET Install the release compiled for $TARGET (default <`rustc` host>) | |||
--to LOCATION Where to install the binary (default ~/.cargo/bin) | |||
--to LOCATION Where to install the binary (default '$CARGO_HOME' if defined, otherwise '~/.cargo/bin') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--to LOCATION Where to install the binary (default '$CARGO_HOME' if defined, otherwise '~/.cargo/bin') | |
--to LOCATION Where to install the binary (default '$CARGO_HOME/bin' if defined, otherwise '~/.cargo/bin') |
More context is in the comment below.
I added a 2nd commit which addresses unquoted variables names preventing shell globbing or word splitting.