From b760919f33bd0a5d971191c875343747b5270fbf Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 18 Jan 2017 22:49:44 +0100 Subject: [PATCH] kill: make second argument optional commit b517076907b7c1 added a check that kill accepts two arguments. Since the second argument is optional, change it back to accept the shorter form "kill CONTAINER". Signed-off-by: Giuseppe Scrivano --- kill.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kill.go b/kill.go index 84f7e313a..e4f5831be 100644 --- a/kill.go +++ b/kill.go @@ -52,10 +52,10 @@ var signalMap = map[string]syscall.Signal{ var killCommand = cli.Command{ Name: "kill", Usage: "kill sends the specified signal (default: SIGTERM) to the container's init process", - ArgsUsage: ` + ArgsUsage: ` [signal] Where "" is the name for the instance of the container and -"" is the signal to be sent to the init process. +"[signal]" is the signal to be sent to the init process. EXAMPLE: For example, if the container id is "ubuntu01" the following will send a "KILL" @@ -69,7 +69,7 @@ signal to the init process of the "ubuntu01" container: }, }, Action: func(context *cli.Context) error { - if err := checkArgs(context, 2, exactArgs); err != nil { + if err := checkArgs(context, 1, minArgs); err != nil { return err } container, err := getContainer(context)