-
Notifications
You must be signed in to change notification settings - Fork 24.9k
[iOS] Replace execSync
with spawnSync
for tarball extraction paths that need to be escaped
#53540
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
Conversation
|
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.
Review automatically exported from Phabricator review in Meta.
This pull request was successfully merged by @kitten in 9731e8e When will my fix make it into a release? | How to file a pick request? |
… need to be escaped (#53540) Summary: Follow-up to #53194 This wasn't previously visible in testing without prebuilds and without a release build. This doesn't show up in debug builds. When testing more against paths that contain spaces, I noticed that release builds can still run into trouble due to the use of `execSync` without escaping paths. While, in other scripts that aren't used in user-projects (afaict), we often escape with quotes and rely on `execSync` calling the shell (due to its `shell: true` default), in some scripts we don't have quote escapes. That said, since paths could in theory contain quotes, adding quotes wouldn't be sufficient. Instead, since the affected `tar` calls are really trivial, we can instead use `spawnSync` with the `shell: false` default, which escapes arguments automatically. ## Changelog: [IOS] [FIXED] - fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces Pull Request resolved: #53540 Test Plan: - Create a project in a folder `with spaces` and build a release build Reviewed By: cipolleschi, cortinico Differential Revision: D81406841 Pulled By: robhogan fbshipit-source-id: 08bb06b2cd2b15dc17c2f95fab9024129deca6f3
… need to be escaped (#53540) Summary: Follow-up to #53194 This wasn't previously visible in testing without prebuilds and without a release build. This doesn't show up in debug builds. When testing more against paths that contain spaces, I noticed that release builds can still run into trouble due to the use of `execSync` without escaping paths. While, in other scripts that aren't used in user-projects (afaict), we often escape with quotes and rely on `execSync` calling the shell (due to its `shell: true` default), in some scripts we don't have quote escapes. That said, since paths could in theory contain quotes, adding quotes wouldn't be sufficient. Instead, since the affected `tar` calls are really trivial, we can instead use `spawnSync` with the `shell: false` default, which escapes arguments automatically. ## Changelog: [IOS] [FIXED] - fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces Pull Request resolved: #53540 Test Plan: - Create a project in a folder `with spaces` and build a release build Reviewed By: cipolleschi, cortinico Differential Revision: D81406841 Pulled By: robhogan fbshipit-source-id: 08bb06b2cd2b15dc17c2f95fab9024129deca6f3
This pull request was successfully merged by @kitten in 366f2ad When will my fix make it into a release? | How to file a pick request? |
Summary:
Follow-up to #53194
This wasn't previously visible in testing without prebuilds and without a release build. This doesn't show up in debug builds.
When testing more against paths that contain spaces, I noticed that release builds can still run into trouble due to the use of
execSync
without escaping paths. While, in other scripts that aren't used in user-projects (afaict), we often escape with quotes and rely onexecSync
calling the shell (due to itsshell: true
default), in some scripts we don't have quote escapes.That said, since paths could in theory contain quotes, adding quotes wouldn't be sufficient. Instead, since the affected
tar
calls are really trivial, we can instead usespawnSync
with theshell: false
default, which escapes arguments automatically.Changelog:
[IOS] [FIXED] - fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces
Test Plan:
with spaces
and build a release build