From 247bf7c2e0c591554b6cfd4c2f62cb2700b034ee Mon Sep 17 00:00:00 2001 From: Feng Cao <24779889+shfc@users.noreply.github.com> Date: Sun, 11 May 2025 01:48:39 +0930 Subject: [PATCH] fix: add warning when ignore repo flag Signed-off-by: Feng Cao <24779889+shfc@users.noreply.github.com> --- pkg/action/install.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/action/install.go b/pkg/action/install.go index 7bdfc2ab5..b2589c06f 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -759,6 +759,11 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) ( return "", err } } + // Issue #7862: Helm prioritizes local charts over --repo flag. + // This behavior is maintained for backwards compatibility but with a warning. + if c.RepoURL != "" { + fmt.Printf("WARNING: local chart %s found in current working directory. --repo flag will be ignored\n", name) + } return abs, nil } if filepath.IsAbs(name) || strings.HasPrefix(name, ".") {