From c358ef9739f00feda2fef5d89a9ca005cb6892e0 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 2 Oct 2026 21:38:55 +0200 Subject: [PATCH] Semver check: drop the unobservable stdio option; the empty-package test really creates the directory Co-Authored-By: Claude Opus 5.5 --- scripts/check-changelog-semver.mjs | 2 +- scripts/check-changelog-semver.test.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check-changelog-semver.mjs b/scripts/check-changelog-semver.mjs index 93a9d53e..30dfa94a 100644 --- a/scripts/check-changelog-semver.mjs +++ b/scripts/check-changelog-semver.mjs @@ -170,7 +170,7 @@ export function evaluateRelease({ packageName, changelogText, version, previousV function resolvePreviousVersion(tagPrefix, currentVersion, cwd) { // A directory that cannot list tags (not a git repository, git missing) throws: that // is not evidence that there was no previous release. - const tags = execFileSync("git", ["tag", "-l", `${tagPrefix}-v*`], { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }) + const tags = execFileSync("git", ["tag", "-l", `${tagPrefix}-v*`], { cwd, encoding: "utf8" }) .split("\n") .map((line) => line.trim()) .filter(Boolean); diff --git a/scripts/check-changelog-semver.test.mjs b/scripts/check-changelog-semver.test.mjs index 2c6da50e..3d11a3db 100644 --- a/scripts/check-changelog-semver.test.mjs +++ b/scripts/check-changelog-semver.test.mjs @@ -725,7 +725,7 @@ test("measured: restores that succeed without delivering the reference assemblie assert.match(runCheckerExpectFailure(dir, measuredArgs(dir, "1.0.1", [oldWidget()]), { script, env }), notRestored); }); // The package directory arrives, but without netstandard.dll in it. - const emptyPackage = 'if [ "$1" = restore ]; then mkdir -p packages/netstandard.library.ref/2.1.0/ref/netstandard2.1; fi\nexit 0'; + const emptyPackage = 'if [ "$1" = restore ]; then /bin/mkdir -p packages/netstandard.library.ref/2.1.0/ref/netstandard2.1; fi\nexit 0'; withFakeDotnet(emptyPackage, (env) => { assert.match(runCheckerExpectFailure(dir, measuredArgs(dir, "1.0.1", [oldWidget()]), { script, env }), notRestored); });