Skip to content

Commit

Permalink
Merge pull request #40 from suryavaddiraju/development
Browse files Browse the repository at this point in the history
v2.0.9
  • Loading branch information
suryavaddiraju authored May 14, 2024
2 parents a03ef10 + 8cbc743 commit 1a73f01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions lib/preinstall.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ if (!fs.existsSync(binaryPath)) {
fs.closeSync(fs.openSync(binaryPath, 'w'));
const file = fs.createWriteStream(binaryPath);
download(url,file);
if (binaryPath.endsWith(".exe")) {
const data = JSON.parse(fs.readFileSync("./package.json"));
data.bin.viu = binaryPath;
fs.writeFileSync("./package.json", JSON.stringify(data, null, 2));
}
};
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "irctc-api",
"description": "An exclusive NodeJs only package built on top of IRCTC Website APIs to book train tickets, managing user profile faster and simpler from anywhere in the world",
"version": "2.0.8",
"version": "2.0.9",
"scripts": {
"preinstall": "node ./lib/preinstall.mjs",
"postinstall": "node ./lib/postinstall.mjs",
Expand Down

0 comments on commit 1a73f01

Please sign in to comment.