mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 08:02:31 +00:00
pnpm 12's npm_execpath is a Mach-O/PE binary. build-native-for-platform.mjs still launched it with `node $npm_execpath`, which throws SyntaxError on the binary header and fails every signed macOS dev-channel build.
44 lines
870 B
JavaScript
44 lines
870 B
JavaScript
import { spawnSync } from 'node:child_process'
|
|
import { resolvePnpmCliInvocation } from './pnpm-cli-invocation.mjs'
|
|
|
|
const extraArgs = process.argv.slice(2)
|
|
const { command: pnpm, prefixArgs: pnpmPrefix, shell } = resolvePnpmCliInvocation()
|
|
const env = {
|
|
...process.env,
|
|
ORCA_E2E_SSH_DOCKER: '1'
|
|
}
|
|
|
|
const runtime = spawnSync(pnpm, [...pnpmPrefix, 'run', 'ensure:electron-runtime'], {
|
|
stdio: 'inherit',
|
|
env,
|
|
shell
|
|
})
|
|
|
|
if (runtime.status !== 0) {
|
|
process.exit(runtime.status ?? 1)
|
|
}
|
|
|
|
const result = spawnSync(
|
|
pnpm,
|
|
[
|
|
...pnpmPrefix,
|
|
'exec',
|
|
'playwright',
|
|
'test',
|
|
'tests/e2e/ssh-docker-bulk-open-freeze-repro.spec.ts',
|
|
'--config',
|
|
'tests/playwright.config.ts',
|
|
'--project',
|
|
'electron-headless',
|
|
'--workers=1',
|
|
...extraArgs
|
|
],
|
|
{
|
|
stdio: 'inherit',
|
|
env,
|
|
shell
|
|
}
|
|
)
|
|
|
|
process.exit(result.status ?? 1)
|