Squash integration of the reviewed Go core, frontend audit fixes, release tooling, and deployment hygiene. CI passed all Server/Client jobs.
11 lines
372 B
JavaScript
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";
|
|
}
|