Skip to content

Commit

Permalink
setup postinstall script fix
Browse files Browse the repository at this point in the history
The path `node ./bin/cli setup` isn't working on some operating systems such as windows, because the forward slash is not recognized.

Just create a setup.js file in the root path and call it without any path issues.
  • Loading branch information
cocktailpeanut committed Mar 17, 2023
1 parent 6c18f02 commit bc49b5a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dalai",
"version": "0.2.20",
"version": "0.2.21",
"description": "",
"main": "index.js",
"author": "cocktailpeanut",
Expand All @@ -13,7 +13,7 @@
"start": "./dalai serve",
"just:run": "wrap () { yarn && yarn dalai:llama $1 && yarn start; }; wrap",
"just:fix": "npx prettier --write .",
"postinstall": "node ./bin/cli setup"
"postinstall": "node setup"
},
"dependencies": {
"7zip-min": "^1.4.4",
Expand Down
8 changes: 8 additions & 0 deletions setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const Dalai = require("./index")
new Dalai().setup().then(() => {
console.log("executed setup")
process.exit(0)
}).catch((e) => {
console.log("Error", e)
process.exit(1)
})

0 comments on commit bc49b5a

Please sign in to comment.