Skip to content

feat(plugin): add user-level plugin directory that survives upgrades#1618

Open
Cyb3rDudu wants to merge 1 commit into
apple:mainfrom
Cyb3rDudu:feat/user-plugin-directory
Open

feat(plugin): add user-level plugin directory that survives upgrades#1618
Cyb3rDudu wants to merge 1 commit into
apple:mainfrom
Cyb3rDudu:feat/user-plugin-directory

Conversation

@Cyb3rDudu
Copy link
Copy Markdown

CLI plugins installed into {install-root}/libexec/container-plugins/ are lost on every container upgrade because the path lives inside the versioned keg (e.g. Homebrew rotates Cellar/container/0.12.3/0.12.4/).

Add a fourth search directory to PluginLoader that is stable across upgrades: XDG_DATA_HOME/container/plugins/ (falls back to ~/.local/share/container/plugins/). The directory is opt-in — it must exist before container will scan it.

User-home plugins take priority over install-root plugins, so a package-manager upgrade cannot silently shadow plugins the user installed themselves. Search order is now: user-home → install-root → app-bundle.

Closes #1617

Plugins installed into the versioned install root are lost on every
container upgrade (e.g. brew upgrade rotates Cellar/container/0.12.3 →
0.12.4, taking libexec/container-plugins/ with it).

Add a fourth search directory to PluginLoader that is stable across
upgrades: XDG_DATA_HOME/container/plugins/ (falls back to
~/.local/share/container/plugins/). The directory is opt-in — it must
exist before container will scan it, so users are not surprised.

User-home plugins take priority over install-root plugins, so
package-managed installs cannot silently shadow plugins the user
installed themselves. Search order is now: user-home → install-root →
app-bundle.

Closes apple#1617
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: User-installed CLI plugins are lost on every container upgrade

1 participant