瀏覽代碼

Merge pull request #26282 from mstanleyjones/26280_fix_pretty_print

`docker node inspect <node> --pretty`  needs an extra newline at the end
Vincent Demeester 9 年之前
父節點
當前提交
5c6b54c278
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      api/client/node/inspect.go

+ 2 - 0
api/client/node/inspect.go

@@ -71,6 +71,8 @@ func printHumanFriendly(out io.Writer, refs []string, getRef inspect.GetRefFunc)
 		// print extra space between objects, but not after the last one
 		if idx+1 != len(refs) {
 			fmt.Fprintf(out, "\n\n")
+		} else {
+			fmt.Fprintf(out, "\n")
 		}
 	}
 	return nil