mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 18:49:50 +02:00
fix: resolve symlinked plugin directories in GetPluginVersion (#2661)
In nix/devbox environments, helm plugin directories are typically symlinks into the Nix store. GetPluginVersion used entry.IsDir() which does not follow symlinks, causing the plugin to be reported as not installed. Follow symlinks with os.Stat before skipping non-directory entries. Signed-off-by: Shane Starcher <shane.starcher@gmail.com> Co-authored-by: Shane Starcher <shane.starcher@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Shane Starcher
Claude Opus 4.6
parent
9b943adc9e
commit
9e66f55d23
@@ -141,7 +141,14 @@ func GetPluginVersion(name, pluginsDir string) (*semver.Version, error) {
|
||||
}
|
||||
|
||||
for _, entry := range entries {
|
||||
if !entry.IsDir() {
|
||||
isDir := entry.IsDir()
|
||||
if !isDir && entry.Type()&os.ModeSymlink != 0 {
|
||||
info, err := os.Stat(filepath.Join(dir, entry.Name()))
|
||||
if err == nil {
|
||||
isDir = info.IsDir()
|
||||
}
|
||||
}
|
||||
if !isDir {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user