Skip to content

Work around Electron Windows command-line args quirk#53510

Closed
motiz88 wants to merge 1 commit into
react:mainfrom
motiz88:export-D81237713
Closed

Work around Electron Windows command-line args quirk#53510
motiz88 wants to merge 1 commit into
react:mainfrom
motiz88:export-D81237713

Conversation

@motiz88

@motiz88 motiz88 commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Summary:
Changelog: [Internal]

Electron imposes a strange undocumented limitation 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.

Differential Revision: D81237713

Summary:
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.

Differential Revision: D81237713
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 28, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D81237713

motiz88 added a commit to motiz88/react-native that referenced this pull request Aug 28, 2025
Summary:

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.

Differential Revision: D81237713
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 28, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in d1a9990.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @motiz88 in d1a9990

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants