Skip to content

Commit ec1edef

Browse files
committed
cli/command: deprecate DockerCli.ContentTrustEnabled
This function was used internally, but is no longer used. Users should check the value of the `DOCKER_CONTENT_TRUST` environment variable instead. There are no known external users of this method, so already removing it from the Cli interface; this method will be removed in the next release. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent bc375df commit ec1edef

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

cli/command/cli.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ type Cli interface {
4848
config.Provider
4949
ServerInfo() ServerInfo
5050
CurrentVersion() string
51-
ContentTrustEnabled() bool
5251
BuildKitEnabled() (bool, error)
5352
ContextStore() store.Store
5453
CurrentContext() string
@@ -160,6 +159,8 @@ func (cli *DockerCli) ServerInfo() ServerInfo {
160159

161160
// ContentTrustEnabled returns whether content trust has been enabled by an
162161
// environment variable.
162+
//
163+
// Deprecated: check the value of the DOCKER_CONTENT_TRUST environment variable to detect whether content-trust is enabled.
163164
func (cli *DockerCli) ContentTrustEnabled() bool {
164165
return cli.contentTrust
165166
}

internal/test/cli.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ type FakeCli struct {
3535
notaryClientFunc NotaryClientFuncType
3636
manifestStore manifeststore.Store
3737
registryClient registryclient.RegistryClient
38-
contentTrust bool
3938
contextStore store.Store
4039
currentContext string
4140
dockerEndpoint docker.Endpoint
@@ -197,11 +196,6 @@ func (c *FakeCli) SetRegistryClient(registryClient registryclient.RegistryClient
197196
c.registryClient = registryClient
198197
}
199198

200-
// ContentTrustEnabled on the fake cli
201-
func (c *FakeCli) ContentTrustEnabled() bool {
202-
return c.contentTrust
203-
}
204-
205199
// BuildKitEnabled on the fake cli
206200
func (*FakeCli) BuildKitEnabled() (bool, error) {
207201
return true, nil

0 commit comments

Comments
 (0)