question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avoid the double dash when passing command line arguments to the app

See original GitHub issue

I noticed that once the app is packaged, command line arguments must be passed after a double dash: $ ./myApp -- --arg1 --arg2

On Windows, I even noticed that you need to add it twice: $ ./myApp.exe -- -- --arg1 --arg2

Is there a way to avoid this behaviour in order to use a simple $ ./myApp --arg1 --arg2 instead?

Which version of electron-packager are you using?

"electron-packager": "^5.2.1"

What CLI arguments are you passing? Alternatively, if you are using the API, what parameters are you passing to the packager() function?

Please see: https://github.com/brrd/Abricotine/blob/845b4016bda252ea6f58846c63cf7529c169314b/scripts/packager.js#L42

What version of Electron are you building with?

"electron-prebuilt": "^0.35.0"

What is the host platform are you running electron-packager on?

Linux Ubuntu 12.04 64 bit and Windows 7 64 bits. I could not try it on OS X.

What target platform(s)/architecture(s) are you building for?

Same as above.

Is there a stack trace in the error message you’re seeing?

None.

Please provide either a failing testcase or detailed steps to reproduce your problem.

Download one of the provided binaries: https://github.com/brrd/Abricotine/releases/tag/0.2.2

And run:

  • $ ./Abricotine --debug => not working
  • then $ ./Abricotine -- --debug => working (the Debug menu appears)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zinwalincommented, Oct 31, 2018

I noticed that once the app is packaged, command line arguments must be passed after a double dash: $ ./myApp -- --arg1 --arg2

On Windows, I even noticed that you need to add it twice: $ ./myApp.exe -- -- --arg1 --arg2

Is there a way to avoid this behaviour in order to use a simple $ ./myApp --arg1 --arg2 instead?

Which version of electron-packager are you using?

"electron-packager": "^5.2.1"

What CLI arguments are you passing? Alternatively, if you are using the API, what parameters are you passing to the packager() function?

Please see: https://github.com/brrd/Abricotine/blob/845b4016bda252ea6f58846c63cf7529c169314b/scripts/packager.js#L42

What version of Electron are you building with?

"electron-prebuilt": "^0.35.0"

What is the host platform are you running electron-packager on?

Linux Ubuntu 12.04 64 bit and Windows 7 64 bits. I could not try it on OS X.

What target platform(s)/architecture(s) are you building for?

Same as above.

Is there a stack trace in the error message you’re seeing?

None.

Please provide either a failing testcase or detailed steps to reproduce your problem.

Download one of the provided binaries: https://github.com/brrd/Abricotine/releases/tag/0.2.2

And run:

  • $ ./Abricotine --debug => not working
  • then $ ./Abricotine -- --debug => working (the Debug menu appears)

Any solution for this issue?

0reactions
maleptcommented, Oct 31, 2018

I don’t think this is an Electron Packager specific issue. You’ll have better luck getting support from one of the community forums: https://electronjs.org/community

Read more comments on GitHub >

github_iconTop Results From Across the Web

What does double-dash do when following a command?
The double dash makes -a and -b arguments to myapp . ... I'm writing a command line parser for python so I need...
Read more >
Where is the `--` (double dash) argument documented?
The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any following arguments...
Read more >
Double Dash (--) parameters in Bash Script - Reddit
I have a project I am working on that requires a parameter with a double dash. For example, running the command should look...
Read more >
What's the difference between one-dash and two-dashes for ...
I was wondering why is it that some programs requires their command prompt parameters to have two dashes in front whereas some ...
Read more >
What's the difference betwen the single dash and double dash ...
The double hyphen disambiguates the command-line argument, ensuring that ... However, it can aid parsers to know more efficiently about options passed to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found