From 7e1e2d0a10862b34e5df481373b2b0f295d1a2ef Mon Sep 17 00:00:00 2001 From: Arsenii Lyashenko Date: Fri, 27 Jun 2025 21:56:05 +0400 Subject: [PATCH] Set empty `CARGO_ENCODED_RUSTFLAGS` in workspace metadata retrieval (#249) --- dist/restore/index.js | 1 + dist/save/index.js | 1 + src/workspace.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/dist/restore/index.js b/dist/restore/index.js index 12dff11..e78857c 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -144357,6 +144357,7 @@ class Workspace { lib_core.debug(`collecting metadata for "${this.root}"`); const meta = JSON.parse(await getCmdOutput("cargo", ["metadata", "--all-features", "--format-version", "1", ...extraArgs], { cwd: this.root, + env: { "CARGO_ENCODED_RUSTFLAGS": "" }, })); lib_core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`); for (const pkg of meta.packages.filter(filter)) { diff --git a/dist/save/index.js b/dist/save/index.js index 42b46c7..74a1ac7 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -144357,6 +144357,7 @@ class Workspace { core.debug(`collecting metadata for "${this.root}"`); const meta = JSON.parse(await getCmdOutput("cargo", ["metadata", "--all-features", "--format-version", "1", ...extraArgs], { cwd: this.root, + env: { "CARGO_ENCODED_RUSTFLAGS": "" }, })); core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`); for (const pkg of meta.packages.filter(filter)) { diff --git a/src/workspace.ts b/src/workspace.ts index e8fa93a..a7d4b30 100644 --- a/src/workspace.ts +++ b/src/workspace.ts @@ -15,6 +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": "" }, }), ); core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`);