From 08760757eda433ddd7af74c25b17eac025a59336 Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Thu, 9 Nov 2017 12:10:08 -0500 Subject: [PATCH] Fix output on ctr images rm to show actual feedback Currently the output for a non-existent image reference and a valid image reference is exactly the same on `ctr images remove`. Instead of outputting the target ref input, if it is "not found" we should alert the user in case of a mispelling, but continue not to make it a failure for the command (given it supports multiple ref entries) Signed-off-by: Phil Estes --- cmd/ctr/commands/images/images.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/ctr/commands/images/images.go b/cmd/ctr/commands/images/images.go index b23ce03b5..86a3649ee 100644 --- a/cmd/ctr/commands/images/images.go +++ b/cmd/ctr/commands/images/images.go @@ -291,9 +291,11 @@ var removeCommand = cli.Command{ log.G(ctx).WithError(err).Errorf("unable to delete %v", target) continue } + // image ref not found in metadata store; log not found condition + log.G(ctx).Warnf("%v: image not found", target) + } else { + fmt.Println(target) } - - fmt.Println(target) } return exitErr