aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal
diff options
context:
space:
mode:
authorDavid Finkel <david.finkel@gmail.com>2025-08-24 15:15:06 -0400
committerGopher Robot <gobot@golang.org>2025-11-02 07:51:05 -0800
commit388c41c412c24b751c8c09465787ae79bceca9c7 (patch)
tree7a18bec6313d32d390581591459b2f0611139857 /src/cmd/internal
parent385dc33250336081c0c630938c3efede481eff76 (diff)
downloadgo-388c41c412c24b751c8c09465787ae79bceca9c7.tar.xz
cmd/go: skip git sha256 tests if git < 2.29
Fix test building on older Ubuntu LTS releases (that are still supported). Git SHA256 support was only included in 2.29, which came out in 2021. Check the output of `git version` and skip these tests if the version is older than that introduction. Thanks to @ianlancetaylor for flagging this. Updates: #73704 Change-Id: I9d413a63fa43f34f94c274bba7f7b883c80433b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/698835 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Michael Matloob <matloob@google.com> Auto-Submit: Michael Matloob <matloob@google.com> Reviewed-by: Ian Alexander <jitsu@google.com>
Diffstat (limited to 'src/cmd/internal')
-rw-r--r--src/cmd/internal/script/engine.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/internal/script/engine.go b/src/cmd/internal/script/engine.go
index 4607868379..05b9433d3e 100644
--- a/src/cmd/internal/script/engine.go
+++ b/src/cmd/internal/script/engine.go
@@ -55,6 +55,8 @@ import (
"errors"
"fmt"
"io"
+ "maps"
+ "slices"
"sort"
"strings"
"time"
@@ -518,7 +520,7 @@ func (e *Engine) conditionsActive(s *State, conds []condition) (bool, error) {
if ok {
impl = e.Conds[prefix]
if impl == nil {
- return false, fmt.Errorf("unknown condition prefix %q", prefix)
+ return false, fmt.Errorf("unknown condition prefix %q; known: %v", prefix, slices.Collect(maps.Keys(e.Conds)))
}
if !impl.Usage().Prefix {
return false, fmt.Errorf("condition %q cannot be used with a suffix", prefix)