Started work on 'helm pull'

Signed-off-by: Andrew Block <andy.block@gmail.com>
This commit is contained in:
Andrew Block 2022-01-09 19:51:03 -06:00 committed by Scott Rigby
parent df98e18eb7
commit 4f62d3dc1b
No known key found for this signature in database
GPG key ID: C7C6FBB5B91C1155
2 changed files with 6 additions and 8 deletions

View file

@ -18,7 +18,6 @@ package resolver
import (
"bytes"
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
@ -137,7 +136,6 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
}
found = false
} else {
fmt.Println("Entering OCI block")
version = d.Version
if !FeatureGateOCI.IsEnabled() {
return nil, errors.Wrapf(FeatureGateOCI.Error(),

View file

@ -92,13 +92,13 @@ func (p *Pull) Run(chartRef string) (string, error) {
}
if registry.IsOCI(chartRef) {
if p.Version == "" {
return out.String(), errors.Errorf("--version flag is explicitly required for OCI registries")
}
c.Options = append(c.Options,
getter.WithRegistryClient(p.cfg.RegistryClient),
getter.WithTagName(p.Version))
getter.WithRegistryClient(p.cfg.RegistryClient))
if p.Version != "" {
c.Options = append(c.Options,
getter.WithTagName(p.Version))
}
}
if p.Verify {