diff options
author | 0neGal <mail@0negal.com> | 2021-12-29 23:33:30 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2021-12-29 23:33:30 +0100 |
commit | 9d4515fd408c38ad081c010e052b2960f5fe3dfe (patch) | |
tree | ffd6528723e7fb4e5e6f99027683794226f22a2d /src/cli.js | |
parent | dcbdadbe3568beca429b0df5caf96156ee43f474 (diff) | |
parent | 74cb566e5ea97f62121fbd7b2cc170b94d36f0bb (diff) | |
download | Viper-9d4515fd408c38ad081c010e052b2960f5fe3dfe.tar.gz Viper-9d4515fd408c38ad081c010e052b2960f5fe3dfe.zip |
Merge branch 'feat/version-indicator' of https://github.com/Alystrasz/viper into feat/icon
Diffstat (limited to 'src/cli.js')
-rw-r--r-- | src/cli.js | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -5,6 +5,7 @@ const Emitter = require("events"); const events = new Emitter(); const cli = app.commandLine; +const lang = require("./lang"); function hasArgs() { if (cli.hasSwitch("cli") || @@ -24,12 +25,12 @@ function exit(code) { async function init() { if (cli.hasSwitch("help")) { console.log(`options: - --help shows this help message - --debug opens the dev/debug tools + --help ${lang("cli.help.help")} + --debug ${lang("cli.help.debug")} - --cli forces the CLI to enable - --update updates Northstar from your set game path - --setpath sets your game path`) + --cli ${lang("cli.help.cli")} + --update ${lang("cli.help.update")} + --setpath ${lang("cli.help.setpath")}`) // In the future --setpath should be able to understand // relative paths, instead of just absolute ones. exit(); @@ -43,7 +44,8 @@ async function init() { if (cli.getSwitchValue("setpath") != "") { ipcMain.emit("setpathcli", cli.getSwitchValue("setpath")); } else { - console.error("error: No argumment provided for --setpath"); + console.error(`error: ${lang("cli.setpath.noarg")}`); + exit(1); } } |