Merge pull request #30852 from shfc/fix/add-warning

fix: add warning when ignore repo flag
pull/30870/head
Robert Sirchia 8 months ago committed by GitHub
commit dc9d5c0cfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -21,6 +21,7 @@ import (
"context"
"fmt"
"io"
"log/slog"
"net/url"
"os"
"path"
@ -750,6 +751,12 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
version := strings.TrimSpace(c.Version)
if _, err := os.Stat(name); err == nil {
// Issue #7862: Helm prioritizes local charts over repository URL.
// This behavior is maintained for backwards compatibility but with a warning.
if c.RepoURL != "" {
slog.Warn("local chart found in current working directory. repository url ignored", "chart", name, "repository", c.RepoURL)
}
abs, err := filepath.Abs(name)
if err != nil {
return abs, err

Loading…
Cancel
Save