no panic if listing non existing container image

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2024-09-16 12:10:51 +02:00
committed by Jonathon Anderson
parent c0c93b153a
commit 883de9c4fc
6 changed files with 66 additions and 65 deletions

View File

@@ -10,6 +10,7 @@ type variables struct {
kernel bool
chroot bool
compressed bool
utc bool
}
// GetRootCommand returns the root cobra.Command for the application.
@@ -28,6 +29,6 @@ func GetCommand() *cobra.Command {
baseCmd.PersistentFlags().BoolVarP(&vars.size, "size", "s", false, "show size information")
baseCmd.PersistentFlags().BoolVarP(&vars.chroot, "chroot", "c", false, "show size of chroot")
baseCmd.PersistentFlags().BoolVar(&vars.compressed, "compressed", false, "show size of the compressed image")
baseCmd.PersistentFlags().BoolVarP(&vars.utc, "utc", "u", false, "use UTC for time output")
return baseCmd
}