Skip to content

Commit

Permalink
deal with zip files instead of gz
Browse files Browse the repository at this point in the history
  • Loading branch information
tantaman committed Dec 1, 2023
1 parent f2c4b75 commit 3cc1018
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/nodejs-install-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (process.env.CRSQLITE_NOPREBUILD) {
break;
}

const binaryUrl = `https://github.com/vlcn-io/cr-sqlite/releases/download/${version}/crsqlite-${os}-${arch}.gz`;
const binaryUrl = `https://github.com/vlcn-io/cr-sqlite/releases/download/${version}/crsqlite-${os}-${arch}.zip`;
console.log(`Look for prebuilt binary from ${binaryUrl}`);
const distPath = join("dist", `crsqlite.${ext}`);

Expand Down Expand Up @@ -89,10 +89,7 @@ if (process.env.CRSQLITE_NOPREBUILD) {
return;
}

const file = fs.createWriteStream(distPath);
res.pip(unzipper.Extract({ path: join(".", "dist") }));
file.on("finish", () => {
file.close();
res.pipe(unzipper.Extract({ path: join(".", "dist") })).on("close", () => {
console.log("Prebuilt binary downloaded");
process.exit(0);
});
Expand Down

0 comments on commit 3cc1018

Please sign in to comment.