mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Remove the workaround which add a -- flag to runc exec command and add integration for exec ls -la
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
var execCommand = cli.Command{
|
||||
Name: "exec",
|
||||
Usage: "execute new process inside the container",
|
||||
ArgsUsage: `<container-id> -- <container command> [command options]
|
||||
ArgsUsage: `<container-id> <container command> [command options]
|
||||
|
||||
Where "<container-id>" is the name for the instance of the container and
|
||||
"<container command>" is the command to be executed in the container.
|
||||
@@ -158,9 +158,6 @@ func getProcess(context *cli.Context, bundle string) (*specs.Process, error) {
|
||||
}
|
||||
p := spec.Process
|
||||
p.Args = context.Args()[1:]
|
||||
if len(p.Args) > 1 && p.Args[0] == "--" {
|
||||
p.Args = p.Args[1:]
|
||||
}
|
||||
// override the cwd, if passed
|
||||
if context.String("cwd") != "" {
|
||||
p.Cwd = context.String("cwd")
|
||||
|
||||
Reference in New Issue
Block a user