External plugins discovery fails when XDG_CONFIG_HOME is set #3224
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What broke? What's expected?
On Ubuntu, when specifying an external plugin to any subcommand (e.g.
init
) through the--plugins
flag, the subcommand fails ifXDG_CONFIG_HOME
is set to its default value$HOME/.config
, with the following error:2023/02/11 15:35:25 no plugin could be resolved with key "myexternalplugin/v1"
The subcommands eventually run successfully after unsetting
XDG_CONFIG_HOME
.Reproducing this issue
export XDG_CONFIG_HOME=$HOME/.config
mkdir -p $XDG_CONFIG_HOME/kubebuilder/plugins/myexternalplugin/v1
kubebuilder init --plugins=myexternalplugin/v1
myexternalplugin
won't appear in the available plugins table.KubeBuilder (CLI) Version
3.9.0
PROJECT version
No response
Plugin versions
No response
Other versions
Go version: 1.19.4 linux/amd64
OS version: Ubuntu 22.04.1 LTS
Extra Labels
No response
The text was updated successfully, but these errors were encountered: