File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -46,26 +46,8 @@ const {
46
46
} = require ( './errors' ) ;
47
47
48
48
function getMainArgs ( ) {
49
- // This function is a placeholder for proposed process.mainArgs.
50
49
// Work out where to slice process.argv for user supplied arguments.
51
50
52
- // Electron is an interesting example, with workarounds implemented in
53
- // Commander and Yargs. Hopefully Electron would support process.mainArgs
54
- // itself and render this workaround moot.
55
- //
56
- // In a bundled Electron app, the user CLI args directly
57
- // follow executable. (No special processing required for unbundled.)
58
- // 1) process.versions.electron is either set by electron, or undefined
59
- // see: https://www.electronjs.org/docs/latest/api/process#processversionselectron-readonly
60
- // 2) process.defaultApp is undefined in a bundled Electron app, and set
61
- // in an unbundled Electron app
62
- // see: https://www.electronjs.org/docs/latest/api/process#processdefaultapp-readonly
63
- // (Not included in tests as hopefully temporary example.)
64
- /* c8 ignore next 3 */
65
- if ( process . versions ?. electron && ! process . defaultApp ) {
66
- return ArrayPrototypeSlice ( process . argv , 1 ) ;
67
- }
68
-
69
51
// Check node options for scenarios where user CLI args follow executable.
70
52
const execArgv = process . execArgv ;
71
53
if ( ArrayPrototypeIncludes ( execArgv , '-e' ) ||
You can’t perform that action at this time.
0 commit comments