-
Notifications
You must be signed in to change notification settings - Fork 146
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
Enclose the app path in quotes, so that the open
command doesn't split it if it contains spaces
#678
Enclose the app path in quotes, so that the open
command doesn't split it if it contains spaces
#678
Conversation
…lit it if it contains spaces
open
command doesn't split if it contains spacesopen
command doesn't split it if it contains spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🙏
Perhaps even better would have been if we were to use execFile
here, i.e. not spawn a shell at all, but this is a good iterative fix on its own 👍
PS: If you’d like to see this in a v0.63.x stable release, it would be great if you could send the same PR to the 0.63-stable
branch.
Btw, be sure to sign the CLA. |
Signed, thanks! |
@alloy I see a homebrew-related fix has been commited to this PR. Is it related? |
Nope, that was to fix an earlier CI failure. I think this failure is a flunk, so I’m re-running the failed task. |
…lit it if it contains spaces (microsoft#678) * Enclose the app path in quotes, so that the `open` command doesn't split it if it contains spaces * [ado] Remove no longer needed homebrew fix Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
…lit it if it contains spaces (microsoft#678) * Enclose the app path in quotes, so that the `open` command doesn't split it if it contains spaces * [ado] Remove no longer needed homebrew fix Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
* Add nullability checks (#704) * Update RCTCxxBridge.mm * add nullability checks * CI should run on PRs to future stable branches (#718) * Enclose the app path in quotes, so that the `open` command doesn't split it if it contains spaces (#678) * Enclose the app path in quotes, so that the `open` command doesn't split it if it contains spaces * [ado] Remove no longer needed homebrew fix Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com> * update podfile.lock * Enclose the app path in quotes, so that the `open` command doesn't split it if it contains spaces (#678) * Enclose the app path in quotes, so that the `open` command doesn't split it if it contains spaces * [ado] Remove no longer needed homebrew fix Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com> * update podfile.lock * windows dep updates to 63 Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Co-authored-by: Sergi Mansilla <sergi@sergimansilla.com> Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
Please select one of the following
Summary
When running
npx react-native run-macos
(or locallynode node_modules/react-native-macos/local-cli/cli.js run-macos
) and if the target app has spaces in the name, the current call to theopen
macOS command will split the path and only keep the last part as the name in the app, which will fail:This fix surrounds the path in quotes, which is the standard way to deal with spaces in the path. It solves the issue and introduces no other effects.
Changelog
[macOS] [Fixed] - Fixes CLI failing to launch app if the path contains spaces
Test Plan
This fix requires no further testing, as it only encloses a file path in quotes, keeping the exact same previous functionality, and preventing spaces from making
open
command misbehave.Microsoft Reviewers: Open in CodeFlow