diff --git a/test/smoke/pack-smoke.mjs b/test/smoke/pack-smoke.mjs index a7f3dbf..a1615a6 100644 --- a/test/smoke/pack-smoke.mjs +++ b/test/smoke/pack-smoke.mjs @@ -7,11 +7,17 @@ const repoRoot = resolve(new URL('../..', import.meta.url).pathname) const sandbox = mkdtempSync(join(tmpdir(), 'ocex-pack-smoke-')) try { - const packedName = execSync('npm pack --silent', { + const packedRaw = execSync('npm pack --json --silent', { cwd: repoRoot, encoding: 'utf8' }).trim() + const packed = JSON.parse(packedRaw) + const packedName = Array.isArray(packed) ? packed[0]?.filename : null + if (!packedName) { + throw new Error('npm pack did not return a tarball filename') + } + const tarball = join(repoRoot, packedName) const probeDir = join(sandbox, 'probe') execSync('mkdir -p probe', { cwd: sandbox })