The removal of CLI package meant there was no way to init the system anymore so nuking budibase directory was unrecoverable, fixing this.

This commit is contained in:
Michael Drury 2020-10-28 22:14:13 +00:00
parent caab43a312
commit fa00b6662d
2 changed files with 19 additions and 1 deletions

View File

@ -32,7 +32,8 @@
"build:electron": "electron-builder --dir",
"publish:electron": "electron-builder -mwl --publish always",
"postinstall": "electron-builder install-app-deps",
"lint": "eslint --fix src/"
"lint": "eslint --fix src/",
"initialise": "node scripts/initialise.js"
},
"keywords": [
"budibase"

View File

@ -0,0 +1,17 @@
const { join } = require("path")
const { homedir } = require("os")
const initialiseBudibase = require("../src/utilities/initialiseBudibase")
const DIRECTORY = "~/.budibase"
function run() {
let opts = {}
let dir = DIRECTORY
opts.quiet = true
opts.dir = dir.startsWith("~") ? join(homedir(), dir.substring(1)) : dir
return initialiseBudibase(opts)
}
run().then(() => {
console.log("Init complete.")
})