feat(plugin): add user-level plugin directory that survives upgrades#1618
Open
Cyb3rDudu wants to merge 1 commit into
Open
feat(plugin): add user-level plugin directory that survives upgrades#1618Cyb3rDudu wants to merge 1 commit into
Cyb3rDudu wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLI plugins installed into
{install-root}/libexec/container-plugins/are lost on everycontainerupgrade because the path lives inside the versioned keg (e.g. Homebrew rotatesCellar/container/0.12.3/→0.12.4/).Add a fourth search directory to
PluginLoaderthat is stable across upgrades:XDG_DATA_HOME/container/plugins/(falls back to~/.local/share/container/plugins/). The directory is opt-in — it must exist beforecontainerwill 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