Files
Piik/scripts/archive-tool.mjs
T
AAA da47189fc3 refactor: unify Go runtime and audited frontend
Squash integration of the reviewed Go core, frontend audit fixes, release tooling, and deployment hygiene. CI passed all Server/Client jobs.
2026-09-06 23:26:01 +08:00

11 lines
372 B
JavaScript

import { existsSync } from "node:fs";
import { join } from "node:path";
export function tarExecutable() {
if (process.platform !== "win32") return "tar";
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
if (!systemRoot) return "tar";
const systemTar = join(systemRoot, "System32", "tar.exe");
return existsSync(systemTar) ? systemTar : "tar";
}