Skip to content

Commit e7e8381

Browse files
devversionDrMarcII
authored andcommitted
web test not launching on windows if shell toolchain path contains whitespace (#389)
The windows launcher code does currently break if the path to the bash binary contains a whitespace. This is common on windows where programs are stored under `C:\Program Files`. e.g. ``` :run C:/Program Files/msys2/usr/bin/bash.exe -c "!run_script!" ``` The path needs to be quoted so that it won't be incorrectly picked up as two separate commands. Resulting in an exception like: ``` 'C:/Program' is not recognized as an internal or external command, operable program or batch file. ```
1 parent 877c68f commit e7e8381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/internal/windows_utils.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ set RUNFILES_MANIFEST_ONLY=1
9797
call :rlocation "{sh_script}" run_script
9898
for %%a in ("{bash_bin}") do set "bash_bin_dir=%%~dpa"
9999
set PATH=%bash_bin_dir%;%PATH%
100-
{bash_bin} -c "!run_script! %*"
100+
"{bash_bin}" -c "!run_script! %*"
101101
""".format(
102102
bash_bin = ctx.toolchains["@bazel_tools//tools/sh:toolchain_type"].path,
103103
sh_script = _file_to_manifest_path(ctx, shell_script),

0 commit comments

Comments
 (0)