Merge pull request #8096 from helen-frank/feature/ctrVersionAddArgsCheck
ctr version: add args check
This commit is contained in:
commit
fa5752ba92
@ -30,6 +30,10 @@ var Command = cli.Command{
|
|||||||
Name: "version",
|
Name: "version",
|
||||||
Usage: "Print the client and server versions",
|
Usage: "Print the client and server versions",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
if context.NArg() != 0 {
|
||||||
|
return fmt.Errorf("extra arguments: %v", context.Args())
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("Client:")
|
fmt.Println("Client:")
|
||||||
fmt.Println(" Version: ", version.Version)
|
fmt.Println(" Version: ", version.Version)
|
||||||
fmt.Println(" Revision:", version.Revision)
|
fmt.Println(" Revision:", version.Revision)
|
||||||
|
Loading…
Reference in New Issue
Block a user