Skip to content

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

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Open
StFS opened this issue Apr 1, 2025 · 2 comments
Open

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

StFS opened this issue Apr 1, 2025 · 2 comments

Comments

@StFS
Copy link

StFS commented Apr 1, 2025

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?

@StFS StFS changed the title k9s complaining about "Plugins load failed" in ghostty k9s complaining about "Plugins load failed" in ghostty on a Mac Apr 1, 2025
@derailed
Copy link
Owner

derailed commented Apr 5, 2025

@StFS Hum... I specifically set my XDG env vars to avoid these surprises in my shell. Given ghostty is an emulator, I guess I am not surprised that they will set these to some locations. N
Not sure what OS you are using but as a rule it might make sense to explicitly set those...

@StFS
Copy link
Author

StFS commented Apr 5, 2025

I'm using MacOS.

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants