Semver check: keep git's stderr out of the refusal (the fatal-message test fails without it)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-02 21:44:03 +02:00
commit 68c1296b7a

View file

@ -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" })
const tags = execFileSync("git", ["tag", "-l", `${tagPrefix}-v*`], { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] })
.split("\n")
.map((line) => line.trim())
.filter(Boolean);