Skip to content

Commit eedebb8

Browse files
author
Mrunal Patel
authored
Merge pull request #1265 from WeiZhang555/fix-exec-regression
Fix regression of exec command
2 parents db99936 + 7719dca commit eedebb8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

exec.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ import (
1818
var execCommand = cli.Command{
1919
Name: "exec",
2020
Usage: "execute new process inside the container",
21-
ArgsUsage: `<container-id> <container command> [command options]
21+
ArgsUsage: `<container-id> <command> [command options] || -p process.json <container-id>
2222
2323
Where "<container-id>" is the name for the instance of the container and
24-
"<container command>" is the command to be executed in the container.
24+
"<command>" is the command to be executed in the container.
25+
"<command>" can't be empty unless a "-p" flag provided.
2526
2627
EXAMPLE:
2728
For example, if the container is configured to run the linux ps command the
@@ -86,7 +87,7 @@ following will output a list of processes running in the container:
8687
},
8788
},
8889
Action: func(context *cli.Context) error {
89-
if err := checkArgs(context, 2, minArgs); err != nil {
90+
if err := checkArgs(context, 1, minArgs); err != nil {
9091
return err
9192
}
9293
if os.Geteuid() != 0 {

0 commit comments

Comments
 (0)