Closed alpha-tango-kilo closed 1 year ago
I'm worried "environment: [string | null]" will inevitably become "parse environment substitutions as well", which would be really annoying. But lets just say it won't, and we're in business tbh.
Can you try the current master
branch (at least 42ca2652019c6ea2f86508e36a81c137ab5edfd1)? That has --{,clear-,inherit-}environment
with the expected semantics:
$ cargo-install-update-config install-update-config -e a=b -E c treesize
Toolchain nightly
Respect binaries false
Target version ^0.4
Default features true
Environment variables a=b
c cleared
$ cargo-install-update-config install-update-config --inherit-environment c treesize
Toolchain nightly
Respect binaries false
Target version ^0.4
Default features true
Environment variables a=b
Works perfectly, thanks so much! The only thing I'd suggest is maybe some shorter aliases, e.g. --{,clear-,inherit-}env
, but regradless the current implementation serves my purpose flawlessly 😄
There's -e
and -E
for set/clear, inherit is effectively a partial -r
so it can stay long and there's no obvious short letter. It's already annoying that it's --...-environment
instead of --...-environment-variable
but that'd be insane imo
Released in v13.2.0
I would like to be able to set an environment variable for the underlying
cargo install
call that happens when updating a specific crateUse case: when updating
sccache
on Windows, you can't havesccache
running, because you can't replace the running executable with the new one. Thus, one of the easiest ways to work around this is to setRUSTC_WRAPPER
to be blank to stop the compilation from using (and therefore running)sccache
, allowing the update to complete successfullyIs this a reasonable feature idea, and would you be open potentially to a PR for this functionality? (No idea when I may get time to do this, but it seems like it should be pretty doable)
Alternatively one could instead hard-code this edge case for just this one crate on just Windows, if that would be preferred over adding a new feature