You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command assumes that the first value in process.argv is the name of the nodejs executable being used, and the the second value is the name of the script which was passed to nodejs.
This is mostly fine except in the situation where a packaged electron app is used. For a packaged app a custom binary is used (typically with the name of the app) and it automatically calls the main.js script at start up. It's process.argv starts with the name of the exe and immediately the first of the user supplied arguments.
A possible solution may be to add an extra method which only takes the list of arguments. The calling application would then be responsible for extracting the real arguments from process.argv. (The method could also just return the parsed results and not modify the commander object. See #183 )
ivan, mykter, amaury1093, zhanglongqi, F1LT3R and 3 more