mirror of
https://github.com/Swatinem/rust-cache.git
synced 2025-12-16 14:39:41 +00:00
Don't overwrite env for cargo-metadata call (#285)
In some cases(eg. if RUST_TOOLCHAIN is set and cargo is managed by rustup) cargo metadata will behave incorrectly if some environment variables are removed
This commit is contained in:
parent
c9119007a1
commit
e306f83d21
@ -15,7 +15,7 @@ export class Workspace {
|
||||
const meta: Meta = JSON.parse(
|
||||
await getCmdOutput("cargo", ["metadata", "--all-features", "--format-version", "1", ...extraArgs], {
|
||||
cwd: this.root,
|
||||
env: { "CARGO_ENCODED_RUSTFLAGS": "" },
|
||||
env: { ...process.env, "CARGO_ENCODED_RUSTFLAGS": "" },
|
||||
}),
|
||||
);
|
||||
core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user