diff --git a/build/clean_go_build_cache.sh b/build/clean_go_build_cache.sh index a55650c8f3..1666381d98 100755 --- a/build/clean_go_build_cache.sh +++ b/build/clean_go_build_cache.sh @@ -1,5 +1,12 @@ #!/bin/sh +# Cleaning the Go cache only makes sense if we actually have Go installed... or +# if Go is actually callable. This does not hold true during deb packaging, so +# we need an explicit check to avoid build failures. +if ! command -v go > /dev/null; then + exit +fi + version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" }