diff --git a/bun.lock b/bun.lock index 469c87f7a..fab038047 100644 --- a/bun.lock +++ b/bun.lock @@ -8,6 +8,7 @@ "css-select": "^5.2.2", "css-tree": "^3.2.1", "domutils": "^3.2.2", + "extract-zip": "^2.0.1", "htmlparser2": "^10.0.0", "marked": "^16.4.2", }, diff --git a/cli/bin/commands/skills.mjs b/cli/bin/commands/skills.mjs index 671b4ee5a..29d153ae6 100644 --- a/cli/bin/commands/skills.mjs +++ b/cli/bin/commands/skills.mjs @@ -15,6 +15,7 @@ import { fileURLToPath } from 'node:url'; import { get } from 'node:https'; import { createHash } from 'node:crypto'; import { tmpdir, homedir } from 'node:os'; +import extract from 'extract-zip'; const __dirname = dirname(fileURLToPath(import.meta.url)); const API_BASE = 'https://impeccable.style'; @@ -116,7 +117,7 @@ async function downloadAndExtractBundle() { const tmpDir = join(tmpdir(), `impeccable-update-${Date.now()}`); await downloadFile(`${API_BASE}/api/download/bundle/universal`, tmpZip); mkdirSync(tmpDir, { recursive: true }); - execSync(`unzip -qo "${tmpZip}" -d "${tmpDir}"`, { encoding: 'utf8' }); + await extract(tmpZip, { dir: tmpDir }); rmSync(tmpZip, { force: true }); return tmpDir; } diff --git a/package.json b/package.json index 19dbbf777..af3c35222 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "css-select": "^5.2.2", "css-tree": "^3.2.1", "domutils": "^3.2.2", + "extract-zip": "^2.0.1", "htmlparser2": "^10.0.0", "marked": "^16.4.2" },