podman load with invalid input has 0 (success) exit code #9672
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
(not quite sure there :D I swear I'm not just trying to use podman randomly like a fuzzer...!)
Description
if podman load failed to parse the input I believe it should error out not just in messages but also in its exit code
(mostly-unrelated: it's a shame saved images can't be signed somehow, or am I missing something?)
Steps to reproduce the issue:
I'm -very bad- at go, but pulling a debugger out it looks like a simple assignment problem in libpod/runtime_img.go (err goes out of scope after the if, so
saveErr = err
only ever saves "nil")?With this diff:
I get:
The error only displaying the last handler's error isn't necessarily the most obvious for users but at least an error bubbles up as it looks like the code originally intended. Happy to submit that as a PR if that makes sense (I'm not sure if this project has a policy to always refer to an issue for each PR? Some people don't like PRs that hadn't been discussed first)
Output of
podman version
:The text was updated successfully, but these errors were encountered: