Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
🥳 finally fix all botway npm installer errors
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed May 8, 2022
1 parent a0a9aac commit 5553646
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
1 change: 1 addition & 0 deletions bin/botway.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ try {
stdio: "inherit",
});
} catch (e) {
console.error(e);
exit(1);
}
4 changes: 3 additions & 1 deletion npm-installer/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ async function install() {

const zipFile = "botway.zip";

// await fs.mkdir(binPath, { recursive: true });
await pipeline(response.body, createWriteStream(zipFile));
const zip = new StreamZip.async({ file: zipFile });

Expand All @@ -66,6 +65,9 @@ async function install() {
if (err) throw err;
});

// chmod +x /bin/botway
await fs.chmod(path.join("bin", "botway"), 0o755);

await fs.rm(zipFile);
await fs.rm(folder(), { recursive: true });
}
Expand Down

0 comments on commit 5553646

Please sign in to comment.