fix: install plugins into the first HELM_PLUGINS directory
Summary
- use the first path entry from
HELM_PLUGINSwhen computing the install destination - keep plugin installation aligned with plugin loading behavior
- add a regression test for multi-directory
HELM_PLUGINS
Why
Helm already loads plugins from a path list, but installation was treating the full HELM_PLUGINS value as a single directory. This caused new plugins to be installed into a literal colon-separated path instead of the first configured plugins directory.
Closes #11310.
Testing
PATH=/tmp/go/bin:$PATH /tmp/go/bin/go test ./internal/plugin/installer -run TestPath -count=1
Promptless prepared a documentation update related to this change.
Triggered by helm/helm #32237
This fix aligns helm plugin install with how Helm loads plugins from a HELM_PLUGINS path list (installing into the first directory). The user-facing behavior is captured by an existing docs update that clarifies $HELM_PLUGINS can be a single directory or a path-separator-delimited list, and that plugins are installed into the first directory when multiple are configured.
@TerryHowe @gjenkins8 could you please take a look at this PR when you get a chance?
It addresses #11310, which was opened by Thomas Hartland, and fixes plugin installation so Helm uses the first directory from HELM_PLUGINS, matching plugin discovery behavior. The regression test was also updated to be portable across path list separators :)
This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.