Skip to content

k9s complaining about "Plugins load failed" in ghostty on a Mac #3241

@StFS

Description

@StFS

I'm seeing the error message in k9s when I start it in my ghostty terminal application on a Mac. When took a look at the logs I'm seeing the following line appear repeatedly:

5:27PM WRN Plugins load failed error="lstat /usr/local/share/k9s/plugins: permission denied"
5:27PM WRN Plugins load failed error="lstat /usr/local/share/k9s/plugins: permission denied"

The /usr/local/share/k9s directory does not exist and in fact, my user does not have permission on /usr/local/share at all.

After a bit of experimenting, I found that this error does not appear when I start k9s in WezTerm.

Further digging got me to realize that the reason for this was that ghostty is setting the XDG_DATA_DIRS environment variable:

XDG_DATA_DIRS=/usr/local/share:/usr/share:/Applications/Ghostty.app/Contents/Resources/ghostty/..

WezTerm does not do that.

When I unset this variable in my ghostty terminal window and re-ran k9s, I did not get the warning about plugin loading failing.

I'm assuming k9s is checking for plugins then in $XDG_DATA_DIR/k9s/plugins but I would think that if it either does not have permission to view that directory (as is the case on my Mac it seems) or the directory does not exist, it should not attempt to load plugins from it... and therefore not produce these warnings. Or is there a different "correct" solution to this? Is the problem on ghostty's side maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions