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:
parent
2b8ed96d2a
commit
08760757ed
@ -291,9 +291,11 @@ var removeCommand = cli.Command{
|
|||||||
log.G(ctx).WithError(err).Errorf("unable to delete %v", target)
|
log.G(ctx).WithError(err).Errorf("unable to delete %v", target)
|
||||||
continue
|
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
|
return exitErr
|
||||||
|
Loading…
Reference in New Issue
Block a user