Skip to content

Commit 4bb25b0

Browse files
zhassan-awsadpaco-aws
authored andcommitted
Inherit parent environment when running cargo build (rust-lang#653)
* Inherit parent environment when running cargo build * Fixed formatting * Removed unnecessary passing of PATH environment since all environment variables are now inherited Co-authored-by: Adrian Palacios <[email protected]>
1 parent 6fbaaf0 commit 4bb25b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/rmc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ def get_config(option):
267267
build_cmd = ["cargo", "build", "--lib", "--target-dir", str(target_dir)]
268268
if build_target:
269269
build_cmd += ["--target", str(build_target)]
270-
build_env = {"RUSTFLAGS": " ".join(rustflags),
271-
"RUSTC": rustc_path,
272-
"PATH": os.environ["PATH"]
273-
}
270+
build_env = os.environ
271+
build_env.update({"RUSTFLAGS": " ".join(rustflags),
272+
"RUSTC": rustc_path
273+
})
274274
if debug:
275275
add_rmc_rustc_debug_to_env(build_env)
276276
if verbose:

0 commit comments

Comments
 (0)