From 9c958c25aab08b816c8ef4709eabda795217c79e Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Sun, 24 Mar 2024 22:12:17 +0100 Subject: [PATCH] Fix "same major version" check logic (#52) This was introduced in 2db269a, but unintentionally checked for full equality of major, minor and patch version rather than just the major version. --- private/util.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/private/util.bzl b/private/util.bzl index 96142b8..99f54e4 100644 --- a/private/util.bzl +++ b/private/util.bzl @@ -19,7 +19,8 @@ def ge(v): def ge_same_major(v): pv = parse_version(v) - return BAZEL_VERSION >= pv and BAZEL_VERSION[0] == pv[0] + # Version 1.2.3 parses to ([1, 2, 3], ...). + return BAZEL_VERSION >= pv and BAZEL_VERSION[0][0] == pv[0][0] def gt(v): return BAZEL_VERSION > parse_version(v)