test(release): admission contract test forwards to the selected HERMES_PYTHON
Some checks are pending
Deploy Site / deploy-vercel (push) Waiting to run
Deploy Site / deploy-docs (push) Waiting to run
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Waiting to run
auto-fix lint issues & formatting / Apply patch (push) Blocked by required conditions

The counting wrapper exec'd a bare `python`, so a contributor who selects an
interpreter only through HERMES_PYTHON would fail before the cache is reached.
Forward to the same interpreter the other channel tests use, shell-quoted.
This commit is contained in:
Teknium
2026-11-25 14:19:59 -08:00
parent 9ea477a027
commit 30db18aaad

View File

@@ -116,7 +116,9 @@ test.skipIf(process.platform === 'win32')('channel admission validates each dist
const temp = fs.mkdtempSync(path.join(os.tmpdir(), 'channel-admit-'))
try {
const log = path.join(temp, 'calls'), python = path.join(temp, 'python')
fs.writeFileSync(python, `#!/bin/sh\necho x >> '${log}'\nexec python "$@"\n`, { mode: 0o755 })
const quote = value => `'${value.replaceAll("'", "'\\''")}'`
fs.writeFileSync(python, `#!/bin/sh\necho x >> ${quote(log)}\nexec ${quote(process.env.HERMES_PYTHON || 'python')} "$@"\n`,
{ mode: 0o755 })
const calls = () => fs.existsSync(log) ? fs.readFileSync(log, 'utf8').split('\n').filter(Boolean).length : 0
const token = randomBytes(8).toString('hex')
const request = { schema: 1, buildId: randomBytes(16).toString('hex'), channel: `smoke-${token}`,