Skip to content

release: can't compile if describe is empty #2267

@BradLugo

Description

@BradLugo

The fix provided by #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:

❯ 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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions