You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to bazel 2.0, bazel silently failed to launch. All bazel commands exited very quickly. I had a .bazelversion file with no newline at the end.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a .bazelversion file with "1.2.0" but no trailing newline; try running bazel, observe that it exits immediately.
What operating system are you running Bazel on?
Linux (I'm a googler if you want to contact me directly)
What's the output of bazel info release?
With .bazelversion of 1.2.0 without a newline it outputs nothing; with a newline it outputs:
bazel info release
INFO: Invocation ID: ee1bab32-42c3-400a-98cb-1293e0659e59
release 1.2.0
Not sure how helpful that is though! dpkg -l bazel tells me I am running the bazel package version 2.0.0.
Any other information, logs, or outputs that you want to share?
I believe the issue is that I have a .bazelversion file without a trailing newline. Adding a newline fixed the problem. (Proposed fix is in kubernetes/kops#8161)
The line in question (based on bash -x -v /usr/bin/bazel) seems to be this one:
@konste Bazel itself doesn't read the .bazelversion file, but the bazel shell script that's installed as /usr/bin/bazel if you install Bazel using apt-get or a similar package manager does - this is intended to help people build projects with the correct Bazel version. Projects like TensorFlow had lots of issues with people trying to build it with a too old or too new version, because they weren't aware that you need a specific Bazel version.
Description of the problem / feature request:
After upgrading to bazel 2.0, bazel silently failed to launch. All bazel commands exited very quickly. I had a
.bazelversion
file with no newline at the end.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a .bazelversion file with "1.2.0" but no trailing newline; try running
bazel
, observe that it exits immediately.What operating system are you running Bazel on?
Linux (I'm a googler if you want to contact me directly)
What's the output of
bazel info release
?With .bazelversion of 1.2.0 without a newline it outputs nothing; with a newline it outputs:
Not sure how helpful that is though!
dpkg -l bazel
tells me I am running the bazel package version 2.0.0.Any other information, logs, or outputs that you want to share?
I believe the issue is that I have a
.bazelversion
file without a trailing newline. Adding a newline fixed the problem. (Proposed fix is in kubernetes/kops#8161)The line in question (based on
bash -x -v /usr/bin/bazel
) seems to be this one:bazel/scripts/packages/bazel.sh
Line 114 in d5ae460
I did confirm that
read -r foo < .bazelversion; echo $?
gives 1 without the trailing newline, and 0 with a trailing newline, so this seems to match.The text was updated successfully, but these errors were encountered: