Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add commandLine.removeSwitch #30933

Merged
merged 2 commits into from
Oct 6, 2021
Merged

feat: add commandLine.removeSwitch #30933

merged 2 commits into from
Oct 6, 2021

Conversation

MarshallOfSound
Copy link
Member

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

Notes: Added commandLine.removeSwitch to allow apps to remove command line switches from Chromiums internal command line representation

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher
@MarshallOfSound MarshallOfSound added semver/minor backwards-compatible functionality target/15-x-y labels Sep 13, 2021
@electron-cation electron-cation bot added new-pr 🌱 PR opened in the last 24 hours api-review/requested 🗳 labels Sep 13, 2021
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM but you forgot a line in app.ts

@miniak
Copy link
Contributor

miniak commented Sep 15, 2021

Object.assign(app, {
commandLine: {
hasSwitch: (theSwitch: string) => commandLine.hasSwitch(String(theSwitch)),
getSwitchValue: (theSwitch: string) => commandLine.getSwitchValue(String(theSwitch)),
appendSwitch: (theSwitch: string, value?: string) => commandLine.appendSwitch(String(theSwitch), typeof value === 'undefined' ? value : String(value)),
appendArgument: (arg: string) => commandLine.appendArgument(String(arg))
} as Electron.CommandLine
});

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like newly added test is failing

@miniak
Copy link
Contributor

miniak commented Sep 30, 2021

@jkleinsc the tests are now passing

Copy link
Member

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API looks good to me.

@miniak
Copy link
Contributor

miniak commented Oct 5, 2021

@jkleinsc this PR can be merged now, everything is green

@jkleinsc jkleinsc merged commit 014ebbd into main Oct 6, 2021
@jkleinsc jkleinsc deleted the remove-switch branch October 6, 2021 20:45
@release-clerk
Copy link

release-clerk bot commented Oct 6, 2021

Release Notes Persisted

Added commandLine.removeSwitch to allow apps to remove command line switches from Chromiums internal command line representation

@trop
Copy link
Contributor

trop bot commented Oct 6, 2021

I have automatically backported this PR to "15-x-y", please check out #31326

@trop trop bot added the in-flight/15-x-y label Oct 6, 2021
@trop trop bot removed the target/15-x-y label Oct 6, 2021
@trop
Copy link
Contributor

trop bot commented Oct 6, 2021

I have automatically backported this PR to "16-x-y", please check out #31327

t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
* feat: add commandLine.removeSwitch

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

* fix: add missing removeSwitch to app.ts

Co-authored-by: Milan Burda <milan.burda@gmail.com>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
* feat: add commandLine.removeSwitch

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

* fix: add missing removeSwitch to app.ts

Co-authored-by: Milan Burda <milan.burda@gmail.com>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
* feat: add commandLine.removeSwitch

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

* fix: add missing removeSwitch to app.ts

Co-authored-by: Milan Burda <milan.burda@gmail.com>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
* feat: add commandLine.removeSwitch

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

* fix: add missing removeSwitch to app.ts

Co-authored-by: Milan Burda <milan.burda@gmail.com>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
* feat: add commandLine.removeSwitch

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

* fix: add missing removeSwitch to app.ts

Co-authored-by: Milan Burda <milan.burda@gmail.com>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
* feat: add commandLine.removeSwitch

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

* fix: add missing removeSwitch to app.ts

Co-authored-by: Milan Burda <milan.burda@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review/approved ✅ semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants