Files
orca/tests/e2e/terminal-node-command.ts
T
mirror 34fa2cd5ca
Skill update round trip / roundtrip (false, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, latest) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
source snapshot 2026-09-02
2026-09-02 02:03:16 +08:00

21 lines
787 B
TypeScript

function quotePosixShellArg(value: string): string {
return `'${value.replaceAll("'", "'\\''")}'`
}
function quotePowerShellArg(value: string): string {
return `'${value.replaceAll("'", "''")}'`
}
function quoteTerminalArg(value: string): string {
return process.platform === 'win32' ? quotePowerShellArg(value) : quotePosixShellArg(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(' ')
}