GoogleContainerTools / container-structure-test

validate the structure of your container images
Apache License 2.0
2.33k stars 198 forks source link

Subcommand `version` does not work with `1.18.0` and `1.18.1` versions #445

Closed dduportal closed 2 months ago

dduportal commented 4 months ago

Hello there 👋

When using the binaries from the GH release for 1.18.0 and 1.18.1 versions (Reproduced with linux/amd64, linux/arm64, darwin/arm64 and windows/amd64), the subcommand version does not work as expected and only prints 12 on the stdout (but still an exit code of 0).

Weirdly, the homebrew installation works (while the binary installation does not).

Reproduction examples:

$ ./container-structure-test-darwin-arm64 version
12
$ echo $?
0
$ docker run --rm -ti --platform=linux/amd64 ubuntu:22.04
>  apt update && apt install -y curl
# ...
> curl --fail --silent --location --show-error --output /usr/local/bin/container-structure-test https://github.com/GoogleContainerTools/container-structure-test/releases/download/v1.18.1/container-structure-test-linux-amd64
> chmod a+x /usr/local/bin/container-structure-test
> /usr/local/bin/container-structure-test version
12
> echo $?
0
loosebazooka commented 4 months ago

Yeah mustve been a debug thing that wasn't fixed. I'll update that.

dduportal commented 2 months ago

For info, the problem is fixed with the 1.19.0 version (at least Linux amd64 and Linux arm64):

root@ae3e0e264bb3:/# /usr/local/bin/container-structure-test version
1.19.0