Skip to content

Commit 3687448

Browse files
committed
fix(scripts): fix second release-gate fake-registry tar fixture on GNU tar
Same defect as the last fix, in the `fakeRegistry` shim used by the end-to-end `runGate` tests: it archived its staged tarball with `tar -czf ... -C stage .`, which GNU tar (the CI runner) writes as `./package/...` members that the production extraction call — an exact member-path match — does not find, unlike bsdtar (macOS). Archiving the staged entries by name instead of `.` fixes it on both.
1 parent 241bcef commit 3687448

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/__tests__/release-gate.test.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,11 @@ describe('the gate exits non-zero when a blocker is found', () => {
770770
' installSqlSha256: process.env.FAKE_NPM_PACK_DIGEST,\n' +
771771
" uninstallSqlSha256: 'unused',\n" +
772772
' }))\n' +
773-
" require('node:child_process').execFileSync('tar', ['-czf', path.join(dest, 'f.tgz'), '-C', path.join(dest, 'stage'), '.'])\n" +
773+
// Archive the staged entries by name, not `.` — GNU tar (the CI
774+
// runner) writes `.`-relative members as `./package/...`, and the
775+
// production extraction call matches an exact member path, which
776+
// does not strip that prefix the way bsdtar (macOS) does.
777+
" require('node:child_process').execFileSync('tar', ['-czf', path.join(dest, 'f.tgz'), '-C', path.join(dest, 'stage'), ...fs.readdirSync(path.join(dest, 'stage'))])\n" +
774778
" process.stdout.write('f.tgz\\n'); process.exit(0)\n" +
775779
'}\n' +
776780
'const found = map[process.argv[3]]\n' +

0 commit comments

Comments
 (0)