diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cefe8f58f28..833b0899591 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -978,6 +978,11 @@ jobs: pnpm exec vitest run --config config/vitest.config.ts config/scripts/nsis-process-check.test.mjs + - name: Prepare pinned Bun for CLI boundary tests + run: | + node config/scripts/build-orcad-bun.mjs --runtime-only --out-dir out/windows-cli-test-runtime + "BUN_EXECUTABLE=$((Resolve-Path out/windows-cli-test-runtime/bun-runtime.exe).Path)" >> $env:GITHUB_ENV + # vitest runs here directly rather than through `pnpm test`, so the addon # assertions only hold once install-node-dependencies has rebuilt natives. - name: Test Windows-specific boundaries diff --git a/src/main/cli/wsl-cli-powershell-boundary.test.ts b/src/main/cli/wsl-cli-powershell-boundary.test.ts index a42278ae314..c4ece5f749f 100644 --- a/src/main/cli/wsl-cli-powershell-boundary.test.ts +++ b/src/main/cli/wsl-cli-powershell-boundary.test.ts @@ -196,6 +196,10 @@ describe('WSL CLI PowerShell boundary', () => { it.skipIf(process.platform !== 'win32')( 'pins a non-ASCII app identity and the dev launcher env through Windows PowerShell 5.1', async () => { + const runtime = process.env.BUN_EXECUTABLE + if (!runtime) { + throw new Error('BUN_EXECUTABLE is required for the managed Bun bridge test') + } const root = await mkdtemp(join(tmpdir(), 'orca-wsl-managed-bridge-')) const userDataPath = join(root, "张三's O\u2019Brien Orca") const cliEntryPath = join(root, 'cli \u2018entry\u2019.cjs') @@ -220,7 +224,7 @@ describe('WSL CLI PowerShell boundary', () => { 'Bypass', '-File', bridgePath, - process.execPath, + runtime, '-WslCwd', root, ...FORWARDED_ARGS diff --git a/src/main/ssh/ssh-remote-orca-cli.test.ts b/src/main/ssh/ssh-remote-orca-cli.test.ts index 637a0c55ce3..cf1bbd336cc 100644 --- a/src/main/ssh/ssh-remote-orca-cli.test.ts +++ b/src/main/ssh/ssh-remote-orca-cli.test.ts @@ -628,7 +628,7 @@ describe('runRemoteOrcaCli', () => { env: { ORCA_TERMINAL_HANDLE: 'term_ssh' } }, { - execPath: '/host/electron', + execPath: '/host/bun-runtime', cliEntryPath: '/host/app/out/cli/index.js', userDataPath: '/host/user-data', entryExists: () => true, @@ -644,6 +644,9 @@ describe('runRemoteOrcaCli', () => { expect(result).toEqual({ stdout: '{"ok":true}\n', stderr: '', exitCode: 0 }) const [, args] = spawn.mock.calls[0] as unknown as [string, string[]] expect(args).toEqual([ + '--no-env-file', + process.platform === 'win32' ? '--config=NUL' : '--config=/dev/null', + '--no-install', '/host/app/out/cli/index.js', 'worktree', 'create',