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 <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes 2017-11-09 12:10:08 -05:00
parent 2b8ed96d2a
commit 08760757ed
No known key found for this signature in database
GPG Key ID: 0F386284C03A1162

View File

@ -291,10 +291,12 @@ 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)
}
}
return exitErr
},