diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b29a8e..f0c32716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,15 @@ # Changelog + +## 0.49.6 + +- bug fixes + - windows users launching the app from a terminal now need to add a double dash (--) before their options + ## 0.49.5 - bug fixes - launcher: file/folder browsing not working - - cli: parsing issues on windows ## 0.49.4 diff --git a/resources/docs/docs/getting-started.md b/resources/docs/docs/getting-started.md index 5070e506..e3b44f89 100644 --- a/resources/docs/docs/getting-started.md +++ b/resources/docs/docs/getting-started.md @@ -193,3 +193,14 @@ npm run build npm run package-node ``` + +## Running in a terminal on Windows + +Windows users launching the app from a terminal need to add a double dash (`--`) before their options: + +```bash +open-stage-control.exe -- --port 5555 [...] + +# when running from sources +npm start -- -- [options] +``` diff --git a/src/server/settings.js b/src/server/settings.js index 9eea096b..6891aebc 100644 --- a/src/server/settings.js +++ b/src/server/settings.js @@ -1,5 +1,12 @@ // This prevents argv parsing to be breaked when the app is packaged (executed without 'electron' prefix) -if (process.argv[1]&&process.argv[1].indexOf('-')==0) process.argv.unshift('') +if (process.argv[1] && process.argv[1].indexOf('-') == 0) process.argv.unshift('') + +// on windows, electron stops parsing after the first argument containing a colon +// https://github.com/electron/electron/pull/13039 +// windows cli users need to add a double dash (--) before their options to avoid that +// it must be stripped to let yargs work normally +if (process.argv[2] == '--') process.argv.splice(2, 1) + var infos = require('../package.json')