File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1745,6 +1745,20 @@ impl Config {
1745
1745
. env_config
1746
1746
. try_borrow_with ( || self . get :: < EnvConfig > ( "env" ) ) ?;
1747
1747
1748
+ // Reasons for disallowing these values:
1749
+ //
1750
+ // - CARGO_HOME: The initial call to cargo does not honor this value
1751
+ // from the [env] table. Recursive calls to cargo would use the new
1752
+ // value, possibly behaving differently from the outer cargo.
1753
+ //
1754
+ // - RUSTUP_HOME: Under normal usage with rustup, this will have no
1755
+ // effect because the rustup proxy sets RUSTUP_HOME, and that would
1756
+ // override the [env] table. If the outer cargo is executed directly
1757
+ // circumventing the rustup proxy, then this would affect calls to
1758
+ // rustc (assuming that is a proxy), which could potentially cause
1759
+ // problems with cargo and rustc being from different toolchains. We
1760
+ // consider this to be not a use case we would like to support,
1761
+ // since it will likely cause problems or lead to confusion.
1748
1762
for disallowed in & [ "CARGO_HOME" , "RUSTUP_HOME" ] {
1749
1763
if env_config. contains_key ( * disallowed) {
1750
1764
bail ! (
You can’t perform that action at this time.
0 commit comments