Skip to content

Commit d1a9990

Browse files
motiz88facebook-github-bot
authored andcommitted
Work around Electron Windows command-line args quirk (#53510)
Summary: Pull Request resolved: #53510 Changelog: [Internal] Electron imposes a [strange undocumented limitation](electron/electron#13039) on the format of command-line arguments, which for some reason only affects Windows. Basically, the command line is truncated after the first argument that looks like a URL. Electron's recommendation for avoiding this is to prefix the argument list with `--`, but I prefer switching to a different arg format (`--x=y` instead of `--x y`) that will prevent us from ever running into this issue. NOTE: I will follow up with a diff to harden arg parsing in our Electron code so that it only accepts the `--x=y` format. Reviewed By: huntie Differential Revision: D81237713 fbshipit-source-id: a255dc63b6486b96d9f7ccf780d1b09bc4ddf7e0
1 parent 31b9f10 commit d1a9990

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dev-middleware/src/utils/DefaultBrowserLauncher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const DefaultBrowserLauncher = {
7474
windowKey: string,
7575
): Promise<void> {
7676
return await unstable_spawnDebuggerShellWithArgs(
77-
['--frontendUrl', url, '--windowKey', windowKey],
77+
['--frontendUrl=' + url, '--windowKey=' + windowKey],
7878
{
7979
mode: 'detached',
8080
flavor: process.env.RNDT_DEV === '1' ? 'dev' : 'prebuilt',

0 commit comments

Comments
 (0)