bazelbuild/setup-bazelisk

Windows: One of the first two slashes gets stripped, and fails builds

mishas opened this issue · 4 comments

When running bazel test //tests:test_all on Windows with bash, one of the slashes gets stripped, and Bazel actually tries to run bazel test /tests:test_all (which fails).

Split from #2

It's worth noting that I seem to be able to reproduce this manually from an MSYS2 CLI but not from a Windows DOS CLI. The error produced in the Win CLI is unrelated (a recent error I started getting from Github for even other projects?) but indicates that target parsing did occur (hence why it failed processing the bullet repo).

Further, the issue seems to be reproducible without bazelisk (just using bazel directly) all the way back to 3.3.1 so far, so it seems to be something endemic to bazel itself on Windows in MSYS2. It doesn't seem to want to work with absolute paths unless you use triple slashes instead of double.

msys32repro
winCLIRepro
msys32Triple

Any update on a fix? This is a real annoyance running bazel on windows with git bash.

See https://bazel.build/configure/windows#running-bazel-shells and the linked Stack Overflow answer. (This just bit me too!)

Closing this issue because this repository is about to be archived.