Usually, on Windows, I use PowerShell (default shell) to call a Bazel command such as bazel build
. As far as I understand Bazel makes use of MSYS2 to call and execute commands such as curl
, zip
or git
for instance. Therefore, I wonder if I should use the MSYS2 bash terminal instead of PowerShell. Can there be any problems when using Powershell instead of the MSYS2 bash terminal? Or doesn’t it matter?
In the current master there was recently an update of the documentation exactly about this issue:
As of 2020-01-15, we do not recommend running Bazel from bash – either from MSYS2 shell, or Git Bash, or Cygwin, or any other Bash variant. While Bazel may work for most use cases, some things are broken, like interrupting the build with Ctrl+C from MSYS2). Also, if you choose to run under MSYS2, you need to disable MSYS2’s automatic path conversion, otherwise MSYS will convert command line arguments that look like Unix paths (e.g. //foo:bar) into Windows paths. See this StackOverflow answer for details.