fix: bundle
This commit is contained in:
@@ -5,6 +5,14 @@ import path from "node:path";
|
||||
export function extractZip(zipPath: string, destDir: string): void {
|
||||
const zip = new AdmZip(zipPath);
|
||||
zip.extractAllTo(destDir, true);
|
||||
|
||||
// adm-zip doesn't preserve Unix file permissions, so mark binaries executable
|
||||
const binDir = path.join(destDir, "kandev", "bin");
|
||||
if (fs.existsSync(binDir)) {
|
||||
for (const file of fs.readdirSync(binDir)) {
|
||||
fs.chmodSync(path.join(binDir, file), 0o755);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function ensureExtracted(zipPath: string, destDir: string): void {
|
||||
|
||||
Reference in New Issue
Block a user