|
|
|
|
|
by _jsn
4412 days ago
|
|
Although this technically works, in some cases it may lead to strange bits of misbehavior. (Depending on where you do it, the app may end up in the wrong audit session or mach namespace, and it may also be missing some environment variables that it was expecting). The open command does allow you to specify command-line arguments to pass to the application (via --args), which is generally a safer way to do things. |
|
So, doing Foo.app/Contents/MacOS/Foo is often the only way to launch a GUI app while inheriting the full environment that you have on the command line.
I often have to do this to launch various developer tools, and have them be able to inherent important environment variables, e.g. database credentials or secrets,