-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows: fix "bazel run" argument quoting
There are two axes of variables: - server mode vs. batch mode (--[no]batch) - Windows only: Bash-less vs. Bash-ful bazel run (--[no]incompatible_windows_bashless_run_command) To "bazel run" a target, Bazel first builds the target then creates a run request. The request is a protobuf that contains the command line (argv) and environment (envvars, cwd). In server mode (--nobatch), the Bazel server sends the run request to the client, and the client executes the program (with CreateProcessW on Windows / execv on Unixes). In batch mode (--batch), the Bazel server itself executes the program using ProcessBuilder. In Bash-ful bazel run mode the run request is for "bash -c <program> <args>...", while in Bash-less more it is for "<program> <args>...". The argument escaping must be different in both cases, because bash.exe uses Bash-style quoting/escaping while most native Windows programs use the MSVC style. Fixes #9106 Fixes #9108 Closes #9123. PiperOrigin-RevId: 262519795
- Loading branch information
1 parent
c62c2a6
commit da557f9
Showing
8 changed files
with
124 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters