diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/options.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/options.go b/libpod/options.go index 104d7c9db..b3c11ebc1 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1419,12 +1419,12 @@ func WithPreserveFDs(fd uint) CtrCreateOption { // WithCreateCommand adds the full command plus arguments of the current // process to the container config. -func WithCreateCommand() CtrCreateOption { +func WithCreateCommand(cmd []string) CtrCreateOption { return func(ctr *Container) error { if ctr.valid { return define.ErrCtrFinalized } - ctr.config.CreateCommand = os.Args + ctr.config.CreateCommand = cmd return nil } } @@ -1625,12 +1625,12 @@ func WithPodHostname(hostname string) PodCreateOption { // WithPodCreateCommand adds the full command plus arguments of the current // process to the pod config. -func WithPodCreateCommand() PodCreateOption { +func WithPodCreateCommand(createCmd []string) PodCreateOption { return func(pod *Pod) error { if pod.valid { return define.ErrPodFinalized } - pod.config.CreateCommand = os.Args + pod.config.CreateCommand = createCmd return nil } } |