fix: hard crash on invalid command line switches (#46004)

* fix: hard crash on invalid command line switch

* Update docs/api/command-line.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* chore: feedback from review

* docs: Add breaking change note

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
This commit is contained in:
Shelley Vohr
2025-03-26 14:14:03 +01:00
committed by GitHub
parent 8412d78310
commit d2c2261c58
3 changed files with 75 additions and 16 deletions

View File

@@ -19,6 +19,14 @@ This document uses the following convention to categorize breaking changes:
`BrowserWindow.IsVisibleOnAllWorkspaces()` will now return false on Linux if the
window is not currently visible.
### Behavior Changes: `app.commandLine`
`app.commandLine` will convert upper-cases switches and arguments to lowercase.
`app.commandLine` was only meant to handle chromium switches (which aren't case-sensitive) and switches passed via `app.commandLine` will not be passed down to any of the child processes.
If you were using `app.commandLine` to control the behavior of the main process, you should do this via `process.argv`.
## Planned Breaking API Changes (36.0)
### Utility Process unhandled rejection behavior change