Closed sjscotti closed 11 months ago
Hi @sjscotti,
Thanks for using caxa and for the nice words. As far as I understand, that’s how macOS works: Application Bundles (.app
) always have a working directory of your home directory. I’m not aware of any way of changing this behavior.
In any case, I’ve been thinking about the broad strategy employed by caxa and concluded that there is a better way to solve the problem. Notably, it does not include the ability to create .app
s. I hope it can still be useful to you anyway.
It’s a different enough approach that I think it deserves a new name, and it’s part of a bigger toolset that I’m building, which I call Radically Straightforward · Package.
I’m deprecating caxa and archiving this repository. I invite you to continue the conversation in Radically Straightforward’s issues.
Best.
Hi! caxa is working great to package up node.js apps using puppeteer, so I'll start off with giving you kudos for that great capability. However, I believe the documentation at https://github.com/leafac/caxa#the-current-working-directory is incorrect for macos - at least when packaging as a
.app
file. It works as described on Windows 10 packaged as a.exe
file, but on macos, the current working directory when you click on the app is the home directory (i.e., the directory you are in when you do acd ~
in the terminal ). I inspected it withprocess.cwd()
as you suggested and verified this. To have the working directory be where the app is installed I inserted this code in it...There may be a more direct way to accomplish this, but adding this code did what I needed.