Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e62764b

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

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[]
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
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /