Description
In pkg/wandb/spec/charts/repo.go:278-281, the fallback destination path can never trigger:
dest := filepath.Join(os.Getenv("HELM_DATA_HOME"), "charts")
if dest == "" {
dest = "./charts"
}
When HELM_DATA_HOME is empty, filepath.Join("", "charts") returns "charts" (not ""), so the dest == "" guard is never true and the "./charts" fallback is dead code.
Functionally benign since "charts" and "./charts" resolve to the same path, but the dead branch is misleading.
Suggested fix
Either remove the dead branch or check the env var directly:
dest := os.Getenv("HELM_DATA_HOME")
if dest == "" {
dest = "./charts"
} else {
dest = filepath.Join(dest, "charts")
}
Found during review of #147.
Description
In
pkg/wandb/spec/charts/repo.go:278-281, the fallback destination path can never trigger:When
HELM_DATA_HOMEis empty,filepath.Join("", "charts")returns"charts"(not""), so thedest == ""guard is never true and the"./charts"fallback is dead code.Functionally benign since
"charts"and"./charts"resolve to the same path, but the dead branch is misleading.Suggested fix
Either remove the dead branch or check the env var directly:
Found during review of #147.