Skip to content

Conversation

@mh182
Copy link

@mh182 mh182 commented Mar 30, 2025

I added a 2nd commit which addresses unquoted variables names preventing shell globbing or word splitting.

@Byron Byron linked an issue Mar 30, 2025 that may be closed by this pull request
Copy link
Owner

@Byron Byron left a 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}"
Copy link
Owner

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.

Suggested change
dest="${CARGO_HOME:-$HOME/.cargo/bin}"
dest="${CARGO_HOME:-$HOME/.cargo}/bin"

What do you think?

--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')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--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.

@Byron
Copy link
Owner

Byron commented Jun 10, 2025

Closing due to inactivity. Please feel free to reopen once there is some time.

@Byron Byron closed this Jun 10, 2025
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.

Installation should take CARGO_HOME into account for default location

2 participants