Error if go-licenses is not on the PATH

This commit is contained in:
William Martin 2025-12-01 16:08:42 +01:00
parent 13d9ab631d
commit f952311b15

View file

@ -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