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

Installation should take CARGO_HOME into account for default location #279

Open
mh182 opened this issue Mar 29, 2025 · 1 comment · May be fixed by #280
Open

Installation should take CARGO_HOME into account for default location #279

mh182 opened this issue Mar 29, 2025 · 1 comment · May be fixed by #280
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mh182
Copy link

mh182 commented Mar 29, 2025

I have configured CARGO_HOME to be $HOME/.cache/cargo and installed dua following the installation instructions. The target location where dua ended was a surprise for me.

Following the pattern of least astonishment I would have expected to end up in $CARGO_HOME/bin.

➜ echo $CARGO_HOME
/home/max/.cache/cargo
➜ curl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh | \
    sh -s -- --git Byron/dua-cli --target x86_64-unknown-linux-musl --crate dua --tag v2.29.0
install.sh: GitHub repository: https://github.com/Byron/dua-cli
install.sh: Crate: dua
install.sh: Tag: v2.29.0
install.sh: Target: x86_64-unknown-linux-musl
install.sh: Installing to: /home/max/.cargo/bin
install.sh: Downloading: https://github.com/Byron/dua-cli/releases/download/v2.29.0/dua-v2.29.0-x86_64-unknown-linux-musl.tar.gz
'/tmp/tmp.GSDRgpom8t/./dua-v2.29.0-x86_64-unknown-linux-musl/dua' -> '/home/max/.cargo/bin/dua'

Suggestion: if CARGO_HOME is defined, use it a default location.

@Byron Byron added bug Something isn't working help wanted Extra attention is needed labels Mar 30, 2025
@Byron
Copy link
Owner

Byron commented Mar 30, 2025

Thanks for reporting!

This might be due to an outdated install.sh script which I believe originates here. The original also seems to ignore CARGO_HOME, and this line seems to be responsible.

One could probably submit a PR there for maximum impact, and then update the script here.

@Byron Byron linked a pull request Mar 30, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants