88 "github.com/docker/cli/cli"
99 "github.com/docker/cli/cli/command"
1010 "github.com/docker/cli/cli/command/image"
11+ "github.com/docker/cli/cli/trust"
1112 "github.com/docker/cli/internal/jsonstream"
1213 "github.com/docker/cli/internal/prompt"
1314 "github.com/docker/cli/internal/registry"
@@ -28,9 +29,9 @@ type pluginOptions struct {
2829 untrusted bool
2930}
3031
31- func loadPullFlags (dockerCli command. Cli , opts * pluginOptions , flags * pflag.FlagSet ) {
32+ func loadPullFlags (opts * pluginOptions , flags * pflag.FlagSet ) {
3233 flags .BoolVar (& opts .grantPerms , "grant-all-permissions" , false , "Grant all permissions necessary to run the plugin" )
33- flags .BoolVar (& opts .untrusted , "disable-content-trust" , ! dockerCli . ContentTrustEnabled (), "Skip image verification" )
34+ flags .BoolVar (& opts .untrusted , "disable-content-trust" , ! trust . Enabled (), "Skip image verification" )
3435}
3536
3637func newInstallCommand (dockerCli command.Cli ) * cobra.Command {
@@ -49,7 +50,7 @@ func newInstallCommand(dockerCli command.Cli) *cobra.Command {
4950 }
5051
5152 flags := cmd .Flags ()
52- loadPullFlags (dockerCli , & options , flags )
53+ loadPullFlags (& options , flags )
5354 flags .BoolVar (& options .disable , "disable" , false , "Do not enable the plugin on install" )
5455 flags .StringVar (& options .localName , "alias" , "" , "Local name for plugin" )
5556 return cmd
0 commit comments