headers were still printing when no targets were found

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
David Lawrence 2015-11-15 02:48:33 -08:00
parent ebc41c8154
commit d0b3bd2860
1 changed files with 2 additions and 1 deletions

View File

@ -461,7 +461,8 @@ func (t targetsSorter) Less(i, j int) bool {
// root keys and then the signing keys.
func prettyPrintTargets(ts []*notaryclient.Target, writer io.Writer) {
if len(ts) == 0 {
writer.Write([]byte("No targets present in this repository.\n"))
writer.Write([]byte("\nNo targets present in this repository.\n\n"))
return
}
sort.Stable(targetsSorter(ts))