File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
crates/toolchain/build/src Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const RUSTUP_TOOLCHAIN_NAME: &str = "nightly-2025-02-14";
25
25
const BUILD_LOCKED_ENV : & str = "OPENVM_BUILD_LOCKED" ;
26
26
const SKIP_BUILD_ENV : & str = "OPENVM_SKIP_BUILD" ;
27
27
const GUEST_LOGFILE_ENV : & str = "OPENVM_GUEST_LOGFILE" ;
28
+ const ALLOWED_CARGO_ENVS : & [ & str ] = & [ "CARGO_HOME" ] ;
28
29
29
30
/// Returns the given cargo Package from the metadata in the Cargo.toml manifest
30
31
/// within the provided `manifest_dir`.
@@ -157,7 +158,9 @@ pub fn guest_methods<S: AsRef<str>>(
157
158
/// removed.
158
159
fn sanitized_cmd ( tool : & str ) -> Command {
159
160
let mut cmd = Command :: new ( tool) ;
160
- for ( key, _val) in env:: vars ( ) . filter ( |x| x. 0 . starts_with ( "CARGO" ) ) {
161
+ for ( key, _val) in env:: vars ( )
162
+ . filter ( |x| x. 0 . starts_with ( "CARGO" ) && !ALLOWED_CARGO_ENVS . contains ( & x. 0 . as_str ( ) ) )
163
+ {
161
164
cmd. env_remove ( key) ;
162
165
}
163
166
cmd. env_remove ( "RUSTUP_TOOLCHAIN" ) ;
You can’t perform that action at this time.
0 commit comments