Skip to content
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

windows_utils.bzl: Escaping \ and " before passing args to bash scrip… #1685

Merged
merged 6 commits into from
Mar 6, 2020

Conversation

meteorcloudy
Copy link
Collaborator

@meteorcloudy meteorcloudy commented Mar 4, 2020

…t with quote

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

#1671

What is the new behavior?

On Windows, passing command line args to node_binary is more consistent with Linux.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@meteorcloudy
Copy link
Collaborator Author

I guess I need to add a test for this.

Copy link
Collaborator

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you for the fix!!

* limitations under the License.
*/

const process = require('process')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the process global variable is defined in a nodejs context without needing a require statement

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -96,7 +96,12 @@ set RUNFILES_MANIFEST_ONLY=1
call :rlocation "{sh_script}" run_script
for %%a in ("{bash_bin}") do set "bash_bin_dir=%%~dpa"
set PATH=%bash_bin_dir%;%PATH%
"{bash_bin}" -c "!run_script! %*"
set args=%*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to have some comments here to explain that this is escaping the arguments

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, comments added.

@alexeagle alexeagle merged commit f9be953 into master Mar 6, 2020
@alexeagle alexeagle deleted the meteorcloudy-patch-2 branch March 6, 2020 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants