diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cli.js | 7 | ||||
-rw-r--r-- | src/index.js | 8 |
2 files changed, 9 insertions, 6 deletions
@@ -39,12 +39,7 @@ async function init() { } if (cli.hasSwitch("update")) {ipcMain.emit("update")} - if (cli.hasSwitch("version")) { - console.log("Viper: v" + require("../package.json").version); - console.log("Node: " + process.version); - console.log("Electron: v" + process.versions.electron); - exit(); - } + if (cli.hasSwitch("version")) {ipcMain.emit("versioncli")} if (cli.hasSwitch("setpath")) { if (cli.getSwitchValue("setpath") != "") { diff --git a/src/index.js b/src/index.js index 660d3a0..063e4df 100644 --- a/src/index.js +++ b/src/index.js @@ -53,6 +53,14 @@ ipcMain.on("getversion", () => { }); }); +ipcMain.on("versioncli", () => { + console.log("Viper: v" + require("../package.json").version); + console.log("Northstar: " + utils.getNSVersion()); + console.log("Node: " + process.version); + console.log("Electron: v" + process.versions.electron); + cli.exit(); +}) + process.chdir(app.getPath("appData")); if (cli.hasArgs()) { |