diff --git a/common/pkg/config/config.go b/common/pkg/config/config.go index 94f95692a8..006692f0e7 100644 --- a/common/pkg/config/config.go +++ b/common/pkg/config/config.go @@ -271,7 +271,7 @@ type EngineConfig struct { // compose command. The first found provider is used for execution. // Can be an absolute and relative path or a (file) name. Make sure to // expand the return items via `os.ExpandEnv`. - ComposeProviders []string `toml:"compose_providers,omitempty"` + ComposeProviders attributedstring.Slice `toml:"compose_providers,omitempty"` // ComposeWarningLogs emits logs on each invocation of the compose // command indicating that an external compose provider is being diff --git a/common/pkg/config/config_local_test.go b/common/pkg/config/config_local_test.go index 7fc5a5d9fe..20407c43c9 100644 --- a/common/pkg/config/config_local_test.go +++ b/common/pkg/config/config_local_test.go @@ -489,12 +489,12 @@ var _ = Describe("Config Local", func() { // Given config, err := New(nil) gomega.Expect(err).To(gomega.BeNil()) - gomega.Expect(config.Engine.ComposeProviders).To(gomega.Equal(getDefaultComposeProviders())) // no hard-coding to work on all platforms + gomega.Expect(config.Engine.ComposeProviders.Get()).To(gomega.Equal(getDefaultComposeProviders())) // no hard-coding to work on all platforms // When config2, err := NewConfig("testdata/containers_default.conf") // Then gomega.Expect(err).To(gomega.BeNil()) - gomega.Expect(config2.Engine.ComposeProviders).To(gomega.Equal([]string{"/some/thing/else", "/than/before"})) + gomega.Expect(config2.Engine.ComposeProviders.Get()).To(gomega.Equal([]string{"/some/thing/else", "/than/before"})) }) It("AddCompression", func() { diff --git a/common/pkg/config/default.go b/common/pkg/config/default.go index 5431a97ced..8ebfc58c34 100644 --- a/common/pkg/config/default.go +++ b/common/pkg/config/default.go @@ -288,7 +288,7 @@ func defaultEngineConfig() (*EngineConfig, error) { c.EventsLogFileMaxSize = eventsLogMaxSize(DefaultEventsLogSizeMax) c.CompatAPIEnforceDockerHub = true - c.ComposeProviders = getDefaultComposeProviders() // may vary across supported platforms + c.ComposeProviders = attributedstring.Slice{Values: getDefaultComposeProviders()} // may vary across supported platforms c.ComposeWarningLogs = true if path, ok := os.LookupEnv("CONTAINERS_STORAGE_CONF"); ok {