mirror of
https://github.com/Swatinem/rust-cache
synced 2026-02-13 14:23:05 +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
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ export class Workspace {
|
||||||
const meta: Meta = JSON.parse(
|
const meta: Meta = JSON.parse(
|
||||||
await getCmdOutput("cargo", ["metadata", "--all-features", "--format-version", "1", ...extraArgs], {
|
await getCmdOutput("cargo", ["metadata", "--all-features", "--format-version", "1", ...extraArgs], {
|
||||||
cwd: this.root,
|
cwd: this.root,
|
||||||
env: { "CARGO_ENCODED_RUSTFLAGS": "" },
|
env: { ...process.env, "CARGO_ENCODED_RUSTFLAGS": "" },
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`);
|
core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue