ctr version: add args check, prohibit incoming args
Signed-off-by: helen <haitao.zhang@daocloud.io>
This commit is contained in:
		| @@ -30,6 +30,10 @@ var Command = cli.Command{ | ||||
| 	Name:  "version", | ||||
| 	Usage: "Print the client and server versions", | ||||
| 	Action: func(context *cli.Context) error { | ||||
| 		if context.NArg() != 0 { | ||||
| 			return fmt.Errorf("extra arguments: %v", context.Args()) | ||||
| 		} | ||||
|  | ||||
| 		fmt.Println("Client:") | ||||
| 		fmt.Println("  Version: ", version.Version) | ||||
| 		fmt.Println("  Revision:", version.Revision) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 helen
					helen