Skip to content

Commit b87b545

Browse files
fix: propagate electron params in second instance startup
1 parent e36f393 commit b87b545

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

arduino-ide-extension/src/electron-main/theia/electron-main-application.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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[] = this.argv
389390
): Promise<boolean> {
390391
// Copy to prevent manipulation of original array
391-
const argCopy = [...this.argv];
392+
const argCopy = [...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
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy