Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go/private/sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ def _detect_sdk_version(ctx, goroot):
version_file_path = goroot + "/VERSION"
if ctx.path(version_file_path).exists:
# VERSION file has version prefixed by go, eg. go1.18.3
version = ctx.read(version_file_path)[2:]
# 1.21: The version is the first line
version = ctx.read(version_file_path)[2:].splitlines()[0]
if ctx.attr.version and ctx.attr.version != version:
fail("SDK is version %s, but version %s was expected" % (version, ctx.attr.version))
return version
Expand Down