1

How do I launch a mac app with an environment variable set?

Everything I can find is really complicated, like this, this or this.

Filip Haglund
  • 13,919
  • 13
  • 64
  • 113
  • Possible duplicate of [Setting environment variables on OS X](https://stackoverflow.com/questions/135688/setting-environment-variables-on-os-x) – Alec May 25 '19 at 17:47

1 Answers1

1

It's actually really simple.

Open up Terminal and run:

~$ export MY_VAR=some-value
~$ open /Applications/Some.app
Filip Haglund
  • 13,919
  • 13
  • 64
  • 113