mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
fix connection usage with containers.conf
--connection was failing due to the servicedestinations array being empty on runtime. Fix by making sure the cached config is used resolves #16282 Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
@ -198,6 +198,8 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
|
||||
if contextConn != nil && contextConn.Changed {
|
||||
return fmt.Errorf("use of --connection and --context at the same time is not allowed")
|
||||
}
|
||||
// need to give our blank containers.conf all of the service destinations if we are using one.
|
||||
podmanConfig.ContainersConf.Engine.ServiceDestinations = podmanConfig.ContainersConfDefaultsRO.Engine.ServiceDestinations
|
||||
podmanConfig.ContainersConf.Engine.ActiveService = conn.Value.String()
|
||||
if err := setupConnection(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user