#2267·clair

release: can't compile if `describe` is empty

Author: BradLugoCreated Jun 21, 2025Updated Jul 24, 2026

The fix provided by https://github.com/quay/clair/pull/1833 doesn't appear to work due to describe being a const.

Steps to reproduce

In cmd/build.go, set describe to an empty string. Then try to build:

bash
❯ go build \
    -trimpath -ldflags="-s -w" -buildvcs=false \
    -o "clairctl-windows-arm64" \
    ./cmd/clairctl
# github.com/quay/clair/v4/cmd
cmd/build.go:88:37: invalid argument: index 0 out of bounds [0:0]