Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Show unknown tag for workload in list-images
Browse files Browse the repository at this point in the history
If we are unable to match the image of the workload to a tag from our
cache, we still list the name of the tag and a question mark where we
would normally list the created date, to indicate we have no record of
it in our cache.
  • Loading branch information
hiddeco committed May 9, 2019
1 parent b01a2bf commit 651ba87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/fluxctl/list_images_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (opts *imageListOpts) RunE(cmd *cobra.Command, args []string) error {
var printEllipsis, printLine bool
if opts.limit <= 0 || lineCount <= opts.limit {
printEllipsis, printLine = false, true
} else if container.Current.ID == available.ID {
} else if container.Current.ID == available.ID {
printEllipsis, printLine = lineCount > (opts.limit+1), true
}
if printEllipsis {
Expand All @@ -136,6 +136,14 @@ func (opts *imageListOpts) RunE(cmd *cobra.Command, args []string) error {
fmt.Fprintf(out, "\t\t%s %s\t%s\n", running, tag, createdAt)
}
}
if !foundRunning {
running := "'->"
if currentTag == "" {
currentTag = "(untagged)"
}
fmt.Fprintf(out, "\t\t%s %s\t%s\n", running, currentTag, "?")

}
workloadName = ""
}
}
Expand Down

0 comments on commit 651ba87

Please sign in to comment.