Files
orca/src/shared/zip-extractor-command.ts
T
OrcaWin 6fc3cdcad6 Bundle Bun for headless Orca and profile persistence (#22635)
Bundle a pinned, verified Bun runtime for headless Orca so existing Node launch commands can hand off before opening a profile. Keep desktop execution on Electron.

Add the Bun SQLite adapter and terminal backend, bounded shutdown, process inspection and cross-platform artifact qualification. Keep future managed SSH deployment separate from current production launch paths.
2026-09-25 22:49:06 -07:00

21 lines
630 B
TypeScript

import { join } from 'node:path'
/** The destination must already exist; callers extract only checksum-verified archives. */
export function getZipExtractorCommand(
zipPath: string,
extractDir: string
): { file: string; args: string[]; label: string } {
if (process.platform === 'win32' && !process.env.ORCA_UNZIP_BIN) {
return {
file: join(process.env.SystemRoot || 'C:\\Windows', 'System32', 'tar.exe'),
args: ['-xf', zipPath, '-C', extractDir],
label: 'tar'
}
}
return {
file: process.env.ORCA_UNZIP_BIN || 'unzip',
args: ['-q', zipPath, '-d', extractDir],
label: 'unzip'
}
}