diff --git a/man/runc-ps.8.md b/man/runc-ps.8.md index 694990a9..d6063471 100644 --- a/man/runc-ps.8.md +++ b/man/runc-ps.8.md @@ -2,7 +2,7 @@ runc ps - ps displays the processes running inside a container # SYNOPSIS - runc ps [command options] [ps options] + runc ps [command options] [-- ps options] # OPTIONS --format value, -f value select one of: table(default) or json diff --git a/ps.go b/ps.go index 3b462a0a..e40a973f 100644 --- a/ps.go +++ b/ps.go @@ -16,7 +16,7 @@ import ( var psCommand = cli.Command{ Name: "ps", Usage: "ps displays the processes running inside a container", - ArgsUsage: ` [ps options]`, + ArgsUsage: ` [-- ps options]`, Flags: []cli.Flag{ cli.StringFlag{ Name: "format, f", @@ -43,6 +43,9 @@ var psCommand = cli.Command{ } psArgs := context.Args().Get(1) + if psArgs == "--" { + psArgs = context.Args().Get(2) + } if psArgs == "" { psArgs = "-ef" }