Skip to content

fix: return inspect format errors#5019

Open
immanuwell wants to merge 1 commit into
containerd:mainfrom
immanuwell:fix-inspect-format-errors
Open

fix: return inspect format errors#5019
immanuwell wants to merge 1 commit into
containerd:mainfrom
immanuwell:fix-inspect-format-errors

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

this makes inspect return a real error when the format string is malformed or unsupported. before this, the command logged the formatter error but still exited 0, which is kinda sneaky in scripts.

repro

  1. run nerdctl image inspect -f '{{bad' alpine
  2. current main prints the template error but exits 0
  3. this patch makes it exit non zero

the change only touches the final inspect formatting path. normal json output and valid templates stay the same.

Signed-off-by: immanuwell <pchpr.00@list.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant