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

Don't show warning if $CARGO_HOME/bin is in $PATH #1239

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

tyilo
Copy link
Contributor

@tyilo tyilo commented Aug 2, 2023

This fixes the incorrect warning shown when installing in the rust docker image:

$ docker run --rm -it rust:1.71.0
# curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
++ mktemp -d
+ cd /tmp/tmp.EcCErDm2XW
+ base_url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-
++ uname -s
+ os=Linux
+ '[' Linux == Darwin ']'
+ '[' Linux == Linux ']'
++ uname -m
+ machine=x86_64
+ target=x86_64-unknown-linux-musl
+ '[' x86_64 == armv7 ']'
+ url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ curl -L --proto =https --tlsv1.2 -sSf https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ tar -xvzf -
cargo-binstall
+ ./cargo-binstall -y --force cargo-binstall
 INFO resolve: Resolving package: 'cargo-binstall'
 WARN The package cargo-binstall v1.1.2 will be downloaded from github.com
 INFO This will install the following binaries:
 INFO   - cargo-binstall (cargo-binstall -> /usr/local/cargo/bin/cargo-binstall)
 INFO Installing binaries...
 INFO Done in 3.08849114s
+ [[ :/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: == *\:\/\r\o\o\t\/\.\c\a\r\g\o\/\b\i\n\:* ]]
+ echo

+ printf '\033[0;31mYour path is missing ~/.cargo/bin, you might want to add it.\033[0m\n'
Your path is missing ~/.cargo/bin, you might want to add it.
+ echo

@NobodyXu NobodyXu added this pull request to the merge queue Aug 2, 2023
Merged via the queue into cargo-bins:main with commit 7c2ddd9 Aug 2, 2023
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.

3 participants