diff options
author | 0neGal <mail@0negal.com> | 2021-12-30 03:25:15 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2021-12-30 03:26:24 +0100 |
commit | 9996dab31959e8af01d18912c4ee3c3b71bb0077 (patch) | |
tree | d19b227834a192eaaca64feeec8a8c292f3464b9 /src/cli.js | |
parent | 25c6b17830dc161e58cd8055083e21268f035b39 (diff) | |
download | Viper-9996dab31959e8af01d18912c4ee3c3b71bb0077.tar.gz Viper-9996dab31959e8af01d18912c4ee3c3b71bb0077.zip |
added --version argument
This will need to be remade once #10 is merged, as to include the
installed Northstar version.
Diffstat (limited to 'src/cli.js')
-rw-r--r-- | src/cli.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -13,6 +13,7 @@ function hasArgs() { cli.hasSwitch("update") || cli.hasSwitch("launch") || cli.hasSwitch("setpath") || + cli.hasSwitch("version") || cli.hasSwitch("gamepath")) { return true; } else {return false} @@ -27,6 +28,7 @@ async function init() { console.log(`options: --help ${lang("cli.help.help")} --debug ${lang("cli.help.debug")} + --version ${lang("cli.help.version")} --cli ${lang("cli.help.cli")} --update ${lang("cli.help.update")} @@ -36,8 +38,12 @@ async function init() { exit(); } - if (cli.hasSwitch("update")) { - ipcMain.emit("update"); + 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("setpath")) { |