diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-29 14:32:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 14:32:41 +0000 |
commit | 236943d3c1fde6f4a2fec15205c1d59be6264d12 (patch) | |
tree | a77f6e4fb9672f5a85ca55935139305926bc7035 /pkg/systemd/generate/pods.go | |
parent | 8e01f48d840b52cc5765e1f0202e0cabacd573f5 (diff) | |
parent | aabafc5b1b55b560c6444b15a7c18a3fa65993d9 (diff) | |
download | podman-236943d3c1fde6f4a2fec15205c1d59be6264d12.tar.gz podman-236943d3c1fde6f4a2fec15205c1d59be6264d12.tar.bz2 podman-236943d3c1fde6f4a2fec15205c1d59be6264d12.zip |
Merge pull request #9848 from Luap99/fix-9776
podman generate systemd --new do not duplicate params
Diffstat (limited to 'pkg/systemd/generate/pods.go')
-rw-r--r-- | pkg/systemd/generate/pods.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go index a76979ecf..1b92649e8 100644 --- a/pkg/systemd/generate/pods.go +++ b/pkg/systemd/generate/pods.go @@ -279,16 +279,16 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions) } podRootArgs = info.CreateCommand[1 : podCreateIndex-1] info.RootFlags = strings.Join(escapeSystemdArguments(podRootArgs), " ") - podCreateArgs = filterPodFlags(info.CreateCommand[podCreateIndex+1:]) + podCreateArgs = filterPodFlags(info.CreateCommand[podCreateIndex+1:], 0) } // We're hard-coding the first five arguments and append the // CreateCommand with a stripped command and subcommand. startCommand := []string{info.Executable} startCommand = append(startCommand, podRootArgs...) startCommand = append(startCommand, - []string{"pod", "create", - "--infra-conmon-pidfile", "{{{{.PIDFile}}}}", - "--pod-id-file", "{{{{.PodIDFile}}}}"}...) + "pod", "create", + "--infra-conmon-pidfile", "{{{{.PIDFile}}}}", + "--pod-id-file", "{{{{.PodIDFile}}}}") // Presence check for certain flags/options. fs := pflag.NewFlagSet("args", pflag.ContinueOnError) |