File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed 
arduino-ide-extension/src/electron-main/theia Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -385,10 +385,11 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
385385  } 
386386
387387  private  async  launchFromArgs ( 
388-     params : ElectronMainCommandOptions 
388+     params : ElectronMainCommandOptions , 
389+     argv ?: string [ ] 
389390  ) : Promise < boolean >  { 
390391    // Copy to prevent manipulation of original array 
391-     const  argCopy  =  [ ...this . argv ] ; 
392+     const  argCopy  =  [ ...( argv   ||   this . argv ) ] ; 
392393    let  path : string  |  undefined ; 
393394    for  ( const  maybePath  of  argCopy )  { 
394395      const  resolvedPath  =  await  this . resolvePath ( maybePath ,  params . cwd ) ; 
@@ -526,7 +527,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
526527    argv : string [ ] , 
527528    cwd : string 
528529  ) : Promise < void >  { 
529-     if  ( await  this . launchFromArgs ( {  cwd,  secondInstance : true  } ) )  { 
530+     if  ( await  this . launchFromArgs ( {  cwd,  secondInstance : true  } ,   argv ) )  { 
530531      // Application has received a file in its arguments 
531532      return ; 
532533    } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments