I'm on an M1 Mac, and I think my `DAGSTER_HOME` en...
# ask-community
I'm on an M1 Mac, and I think my
environment variable isn't being read properly - or I've messed something up in my environment. Either way, figured I should share 🙂 (in 🧵)
I tried setting
in a few different ways: 1. my environment a. via the command line b.
2. my
file but when I'd run
dagster dev
, I'd always get the temporary storage folder.
I was able to read it in my dagster code via
- I think it was pulling from the
What ended up working was putting it in the command itself:
DAGSTER_HOME=/tmp/dagster_home dagster dev
and that was just a guess, because I saw somewhere an instruction to run
that way 🤷
Hey Dan - the .env file only works for loading env vars within your Dagster code which I think is consistent with what you’re seeing - the place where it checks DAGSTER_HOME at the start of dagster dev happens earlier. This is a very common point of confusion though so we’re thinking of making the .env file work for dagster system code as well.
In the short term, I find the tool direnv quite helpful for this. If will automatically load environment variables from .env files which are in your current directory or in parent directories.
Ah, OK. So its something on my end where I'm not setting the environment variable properly so that the dagster process can see it. I'll chase it down someday, maybe after I see if my teammates have the same trouble on their machines. Sorry for the trouble!