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 {
4646}  =  require ( './errors' ) ; 
4747
4848function  getMainArgs ( )  { 
49-   // This function is a placeholder for proposed process.mainArgs. 
5049  // Work out where to slice process.argv for user supplied arguments. 
5150
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- 
6951  // Check node options for scenarios where user CLI args follow executable. 
7052  const  execArgv  =  process . execArgv ; 
7153  if  ( ArrayPrototypeIncludes ( execArgv ,  '-e' )  || 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments