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

Appearance settings

Commit b87b545

Browse filesBrowse files
fix: propagate electron params in second instance startup
1 parent e36f393 commit b87b545
Copy full SHA for b87b545

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

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

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/electron-main/theia/electron-main-application.ts
+4-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.