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, launcher: rename GetEscapedArgument #7395

Closed
wants to merge 2 commits into from

Conversation

laszlocsomor
Copy link
Contributor

@laszlocsomor laszlocsomor commented Feb 11, 2019

Introduce BashEscapeArg and WindowsEscapeArg that
just wrap GetEscapedArgument for now.

The Bash launcher needs to escape the arguments
Bash style (using BashEscapeArg) while the Java
and Python launchers need to escape them Windows
style (using WindowsEscapeArg).

(The code is now incorrectly escaping everything
with Bash syntax, i.e. GetEscapedArgument.)

Next step: implement correct escaping semantics
for subprocesses created with CreateProcessW.

See #7072

Next step: implement correct escaping semantics
for subprocesses created with CreateProcessW.

See bazelbuild#7072
@laszlocsomor laszlocsomor requested a review from lfpino February 12, 2019 10:52
@laszlocsomor
Copy link
Contributor Author

/cc @meteorcloudy -- FYI.
(I'm asking @lfpino to review because this PR leads up to some Java-related changes and he is working on that now.)

laszlocsomor added a commit to laszlocsomor/bazel that referenced this pull request Feb 12, 2019
Add a unit test to assert that:
- WindowsEscapeArg escapes flags as expected
- When we pass a WindowsEscapeArg-escaped flag to
  CreateProcessW, the subprocess receives the
  original flag.

This is a follow-up to bazelbuild#7395

Next I'll fix WindowsEscapeArg to correctly escape
arguments.

See bazelbuild#7072
@bazel-io bazel-io closed this in 68ea97d Feb 12, 2019
@laszlocsomor laszlocsomor deleted the gh-7072-a branch February 13, 2019 06:59
laszlocsomor added a commit to laszlocsomor/bazel that referenced this pull request Feb 13, 2019
Add a unit test to assert that:
- WindowsEscapeArg escapes flags as expected
- When we pass a WindowsEscapeArg-escaped flag to
  CreateProcessW, the subprocess receives the
  original flag.

This is a follow-up to bazelbuild#7395

Next I'll fix WindowsEscapeArg to correctly escape
arguments.

See bazelbuild#7072
bazel-io pushed a commit that referenced this pull request Feb 13, 2019
Add a unit test to assert that:
- WindowsEscapeArg escapes flags as expected
- When we pass a WindowsEscapeArg-escaped flag to
CreateProcessW, the subprocess receives the
original flag.

This is a follow-up to #7395

Next I'll fix WindowsEscapeArg to correctly escape
arguments.

See #7072

Closes #7402.

PiperOrigin-RevId: 233703690
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