mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
* test(e2e): one posixShellQuote; docker-ssh-host fixture names * test(e2e): leave the main-failing stall-recovery spec untouched --------- Co-authored-by: m4air <m4air@Mac.localdomain>
16 lines
746 B
TypeScript
16 lines
746 B
TypeScript
import { quotePowerShellLiteral } from '../../src/shared/powershell-native-argument'
|
|
import { quotePosixShell } from '../../src/shared/wsl-login-shell-command'
|
|
|
|
function quoteTerminalArg(value: string): string {
|
|
return process.platform === 'win32' ? quotePowerShellLiteral(value) : quotePosixShell(value)
|
|
}
|
|
|
|
export function nodeTerminalCommand(args: readonly string[]): string {
|
|
const nodeExecutable = quoteTerminalArg(process.execPath)
|
|
const executable = process.platform === 'win32' ? `& ${nodeExecutable}` : nodeExecutable
|
|
|
|
// Why: Windows CI shells do not always inherit setup-node's PATH, so E2E
|
|
// terminal probes must invoke the runner's Node executable directly.
|
|
return [executable, ...args.map(quoteTerminalArg)].join(' ')
|
|
}
|