diff --git a/cmd/helm/pull.go b/cmd/helm/pull.go index b094db6c3..7711320f1 100644 --- a/cmd/helm/pull.go +++ b/cmd/helm/pull.go @@ -69,8 +69,6 @@ func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { if !FeatureGateOCI.IsEnabled() { return FeatureGateOCI.Error() } - - client.OCI = true } for i := 0; i < len(args); i++ { diff --git a/pkg/action/pull.go b/pkg/action/pull.go index a7f69c4bc..acd39bf05 100644 --- a/pkg/action/pull.go +++ b/pkg/action/pull.go @@ -43,7 +43,6 @@ type Pull struct { Devel bool Untar bool VerifyLater bool - OCI bool UntarDir string DestDir string cfg *Configuration @@ -90,7 +89,7 @@ func (p *Pull) Run(chartRef string) (string, error) { RepositoryCache: p.Settings.RepositoryCache, } - if p.OCI { + if strings.HasPrefix(chartRef, "oci://") { if p.Version == "" { return out.String(), errors.Errorf("--version flag is explicitly required for OCI registries") }