Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

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

Closed
mishas opened this issue May 3, 2021 · 4 comments
Closed

Comments

@mishas
Copy link
Contributor

mishas commented May 3, 2021

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

@Ragora
Copy link

Ragora commented May 3, 2021

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

@crazyjat
Copy link

crazyjat commented Nov 7, 2022

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

@junyer
Copy link
Contributor

junyer commented Mar 4, 2024

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

@junyer
Copy link
Contributor

junyer commented Mar 11, 2024

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

@junyer junyer closed this as completed Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants