fix: replace fmt warning with slog

Signed-off-by: Feng Cao <24779889+shfc@users.noreply.github.com>
pull/30852/head
Feng Cao 5 months ago
parent 247bf7c2e0
commit 6b5c94475d

@ -21,6 +21,7 @@ import (
"context" "context"
"fmt" "fmt"
"io" "io"
"log/slog"
"net/url" "net/url"
"os" "os"
"path" "path"
@ -762,7 +763,7 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
// Issue #7862: Helm prioritizes local charts over --repo flag. // Issue #7862: Helm prioritizes local charts over --repo flag.
// This behavior is maintained for backwards compatibility but with a warning. // This behavior is maintained for backwards compatibility but with a warning.
if c.RepoURL != "" { if c.RepoURL != "" {
fmt.Printf("WARNING: local chart %s found in current working directory. --repo flag will be ignored\n", name) slog.Warn("local chart found in current working directory. --repo flag ignored", "chart", name)
} }
return abs, nil return abs, nil
} }

Loading…
Cancel
Save