import assert from "node:assert/strict"; import { spawnSync } from "node:child_process"; import { test } from "node:test"; for (const environment of [ { VERSION: "1.2.3", RELEASE_COMMIT: "a".repeat(40) }, { VERSION: "../../outside", RELEASE_CREDENTIAL: "synthetic-cli-fixture", RELEASE_COMMIT: "a".repeat(40), }, ]) { test(`CLI fails closed without echoing environment: ${Object.keys(environment)}`, () => { const child = spawnSync(process.execPath, ["build/release-tools/publish-release.js"], { encoding: "utf8", env: environment, }); assert.equal(child.status, 1); assert.equal(child.stdout, ""); assert.equal(child.stderr, "Release publication failed; inspect the release state before retrying.\n"); }); }