Merge pull request #296 from endophage/pretty_print_targets

headers were still printing when no targets were found
This commit is contained in:
Diogo Mónica 2015-11-15 13:12:29 +01:00
commit 4f347a1303
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))