-
Notifications
You must be signed in to change notification settings - Fork 30
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
bug: cargo +channel command won't work with "cargo auditable" alias #180
Comments
Right. I don't know if there's a way to do this with an alias that's portable between shells. A bash script that checks if the next argument starts with a |
Hi @Shnatsel , perhaps using something like RUSTC_WRAPPER would work? I don't know. I am a noob, just learned about RUSTC_WRAPPER. However, logically auditable would be necessary on builds only. It could make sense? |
No, unfortunately |
On systems where bash is available, you can use this bash script: #!/bin/bash
if [[ "$1" == +* ]]; then
# special handling for +nightly: it needs to become 'cargo +nightly auditable'
# but without this branch it would turn into 'cargo auditable +nightly' and break
toolchain="$1"
shift 1 # remove $1 from the list of arguments
cargo "$toolchain" auditable "$@"
else
cargo auditable "$@"
fi Save it as |
Thanks @Shnatsel , I appreciate. I use fish however. At least it will be useful for bash users :) I guess I'll have to remember to run cargo auditable manually or use it with CI/CD |
This script always uses bash in a standalone process, and will work regardless of what your interactive shell is. |
I was thinking about operning an issue with Cargo to add something similar. There are so many tools for cargo, it may be beneficial to have a CARGO_WRAPPER in cargo/config.toml. Or is this nah? |
I don't think that is worth the trouble, and the Cargo team is spread thin as it is. |
Hi,
If I set an alias as suggested here https://github.com/rust-secure-code/cargo-auditable?tab=readme-ov-file#can-i-make-cargo-always-build-with-cargo-auditable and try to run
cargo +nighly test
(or any +channel command) it fails:if I remove the alias, everything is back to normal.
The text was updated successfully, but these errors were encountered: