Browse Source

Merge pull request #26282 from mstanleyjones/26280_fix_pretty_print

`docker node inspect <node> --pretty`  needs an extra newline at the end
Vincent Demeester 8 năm trước cách đây
mục cha
commit
5c6b54c278
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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
 		// print extra space between objects, but not after the last one
 		if idx+1 != len(refs) {
 		if idx+1 != len(refs) {
 			fmt.Fprintf(out, "\n\n")
 			fmt.Fprintf(out, "\n\n")
+		} else {
+			fmt.Fprintf(out, "\n")
 		}
 		}
 	}
 	}
 	return nil
 	return nil