Running linux binary creates resources and vendor folders in current working directory
Hello,
while attempting to make a flatpak for this app I noticed that the latest kubenav Linux binary attempts to write to a sandboxed directory within the flatpak environment.
And indeed when starting the binary directly via ./kubenav the binary creates resources and vendor directories in the current working directory.
Is there a way to relocate these to ~/.local/share/kubenav or perhaps even better, to unbundle these upfront and make the kubenav binary refer to the unbundled files?
I thought about preparing a patch and looked around in astikit, but I must admit that I am neither familiar with go nor with electron so I do not really understand what's going on :innocent:
Cheers, Basti
Hi @lunaryorn, yes this is the default behavior of go-astilectron.
I looked a little bit into the bundler, but couldn't find a suitable option. Maybe we can provide a custom RestoreAssets function to restore the assets into another location: https://github.com/kubenav/kubenav/blob/98376ab73a245d36ce5f83fb1291119f0f3c3eba/cmd/electron/main.go#L179
Thanks. I'll try to patch this, but I really wonder if it was possible to build kubenav without binding at all? I understand that it's really helpful to distribute a single binary, but for packaging it really gets in the way.
It'd be great if I could just copy the resources to a directory and then tell kubenav to load resources from that directory 🤔
Hi, I think this should be fixed with the latest release, if not please let me know.