From f952311b15e4510deb0b5cb7ae16d45bbe5ec53e Mon Sep 17 00:00:00 2001 From: William Martin Date: Mon, 1 Dec 2025 16:08:42 +0100 Subject: [PATCH] Error if go-licenses is not on the PATH --- script/licenses | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script/licenses b/script/licenses index 7a13994cc..2dd313a2d 100755 --- a/script/licenses +++ b/script/licenses @@ -5,6 +5,12 @@ if [ "$CI" != "true" ]; then go install github.com/google/go-licenses@latest fi +# Verify go-licenses is available +if ! command -v go-licenses &> /dev/null; then + echo "Error: go-licenses is not installed or not on PATH" + exit 1 +fi + # Setup temporary directory to collect updated third-party source code export TEMPDIR="$(mktemp -d)" trap "rm -fr ${TEMPDIR}" EXIT