From 347a0c06a2781578f0d3c6fe2cc3a8b64ad5b62d Mon Sep 17 00:00:00 2001 From: Abdul Wahab <32850166+abdulwahabone@users.noreply.github.com> Date: Sat, 6 Jun 2026 03:16:23 +0900 Subject: [PATCH] Fix Windows skill bundle extraction (#198) --- bun.lock | 1 + cli/bin/commands/skills.mjs | 3 ++- package.json | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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" },