mirror of
https://github.com/containers/podman.git
synced 2025-10-17 03:04:21 +08:00
do not set the CreateCommand for API users
This should be set only by podman as it is used for the podman generate systemd --new command. For the api it was set to the system service command which is simply pointless. It must be empty in these cases. Fixes #25026 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -161,6 +161,9 @@ func create(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
s.RawImageName = rawImageName
|
||||
|
||||
// Include the command used to create the container.
|
||||
s.ContainerCreateCommand = os.Args
|
||||
|
||||
if err := createPodIfNecessary(cmd, s, cliVals.Net); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -206,6 +206,10 @@ func run(cmd *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
s.RawImageName = rawImageName
|
||||
|
||||
// Include the command used to create the container.
|
||||
s.ContainerCreateCommand = os.Args
|
||||
|
||||
s.ImageOS = cliVals.OS
|
||||
s.ImageArch = cliVals.Arch
|
||||
s.ImageVariant = cliVals.Variant
|
||||
|
Reference in New Issue
Block a user