Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix: use unzipper instead of tar for Windows key listener extraction (#273)

Marcus68c037b45562
diff --git a/scripts/download-windows-key-listener.js b/scripts/download-windows-key-listener.js
index b939cb756..5b806defc 100644
--- a/scripts/download-windows-key-listener.js
+++ b/scripts/download-windows-key-listener.js
@@ -80,7 +80,7 @@ async function main() {
fs.mkdirSync(extractDir, { recursive: true });
console.log(" Extracting...");
- extractZip(zipPath, extractDir);
+ await extractZip(zipPath, extractDir);
// Find and copy the binary
const binaryPath = path.join(extractDir, BINARY_NAME);
diff --git a/scripts/lib/download-utils.js b/scripts/lib/download-utils.js
index 7303c84b4..98045ef48 100644
--- a/scripts/lib/download-utils.js
+++ b/scripts/lib/download-utils.js
@@ -227,9 +227,14 @@ function downloadFile(url, dest, retryCount = 0) {
});
}
-function extractZip(zipPath, destDir) {
+async function extractZip(zipPath, destDir) {
if (process.platform === "win32") {
- execSync(`tar -xf "${zipPath}" -C "${destDir}"`, { stdio: "inherit" });
+ // Use unzipper package on Windows for better path handling
+ const unzipper = require("unzipper");
+ await fs
+ .createReadStream(zipPath)
+ .pipe(unzipper.Extract({ path: destDir }))
+ .promise();
} else {
execSync(`unzip -o "${zipPath}" -d "${destDir}"`, { stdio: "inherit" });
}