twoliter
twoliter copied to clipboard
The go build of krane can fail and the script still proceeds (and fails on the krane binary not being available)
Hi again! Your friendly neighbourhood Build System (W)rapper! It turns out that this line here: https://github.com/bottlerocket-os/twoliter/blob/develop/tools/krane/build.rs#L54
(Perhaps) mistakenly assumes that if you put an .expect() on .status() from Command that it will error if the command results in a non-zero exit code. This is not actually the case, as .status() returns a Result<StatusCode> and the .expect() only gets raised if there is no StatusCode inside, the command may still have failed.
I would suggest to also check the status code of the go command ❤
This is, indeed, an oversight. This is at the very least caught for official releases by the integration tests run in our GitHub Actions CI.
We'll take a look at protecting against build failures in the build script! Thanks for the heads up!