remove action errors assuming CLI

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
pull/9782/head
Josh Dolitsky 4 years ago
parent 35fdc688cd
commit 3e17c1a7ef
No known key found for this signature in database
GPG Key ID: B2B93673243A65FB

@ -666,7 +666,7 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
if strings.HasPrefix(name, "oci://") { if strings.HasPrefix(name, "oci://") {
if version == "" { if version == "" {
return "", errors.Errorf("--version flag is explicitly required for OCI registries") return "", errors.New("version is explicitly required for OCI registries")
} }
dl.Options = append(dl.Options, getter.WithTagName(version)) dl.Options = append(dl.Options, getter.WithTagName(version))
} }
@ -725,9 +725,5 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
atVersion = fmt.Sprintf(" at version %q", version) atVersion = fmt.Sprintf(" at version %q", version)
} }
hint := "running `helm repo update` may help" return filename, errors.Errorf("failed to download %q%s", name, atVersion)
if strings.HasPrefix(name, "oci://") {
hint = "running `helm registry login` may help)"
}
return filename, errors.Errorf("failed to download %q%s (hint: %s)", name, atVersion, hint)
} }

Loading…
Cancel
Save