From d0b3bd286086575db22431bbde43cb2916a4787a Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Sun, 15 Nov 2015 02:48:33 -0800 Subject: [PATCH] headers were still printing when no targets were found Signed-off-by: David Lawrence (github: endophage) --- cmd/notary/tuf.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/notary/tuf.go b/cmd/notary/tuf.go index 153f0aaddf..ba91a2c513 100644 --- a/cmd/notary/tuf.go +++ b/cmd/notary/tuf.go @@ -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))