Files
orca/src/shared/zip-extractor-command.ts
T
Neil 83cf7cf5e2 perf(ci): compile release JavaScript once for all packaging hosts (#25828)
* perf(ci): share release JavaScript across packaging hosts

* fix(ci): verify the projected web entry in release archives

* fix(ci): use the Windows system archive tool for release bundles

* test(ci): retain stylesheet evidence in release build comparisons

* test(ci): verify release parity across native color rounding

* test(ci): normalize manifest asset references without changing import order

* test(ci): compare portable outputs across Windows text and color formatting

* test(ci): preserve module identity across dependent asset hashes

* fix(ci): keep SVG build inputs identical across release hosts

* fix(ci): stabilize compiler inputs and projected web bindings

* fix(ci): retain vendor minification in projected web output

* test(ci): normalize platform-specific pnpm manifest source paths

* fix(packaging): exclude shared build staging from application files

* test: align thinking-state fixtures with the current source shape

* test(mobile): reuse message fixtures within the line limit
2026-10-06 13:22:04 -07:00

27 lines
747 B
TypeScript

import { join } from 'node:path'
export function getTarProgram(): string {
return process.platform === 'win32'
? join(process.env.SystemRoot || 'C:\\Windows', 'System32', 'tar.exe')
: 'tar'
}
/** 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: getTarProgram(),
args: ['-xf', zipPath, '-C', extractDir],
label: 'tar'
}
}
return {
file: process.env.ORCA_UNZIP_BIN || 'unzip',
args: ['-q', zipPath, '-d', extractDir],
label: 'unzip'
}
}