Replies: 1 comment
-
The closest I've got to this working is calling a script to set the vars...
This does actually work, but runs on every new prompt which is really slow. I've even put a check to see if the variables have already been set at the top of that script, but somehow it can't see them next time it gets called. The obvious answer would seem to be using the enter hook like this...
Or even
But neither of these seems to actually set the vars, calling The ideal solution here I think would be something along the lines of |
Beta Was this translation helpful? Give feedback.
-
Hello.
I've been trying to get Mise to accept and pass on environment variables which are already present in the shell session when running a task. The reason for this is we use a service for storing envars for different projects, and these need to be expanded into the shell session in order to bring up the local project - so they're not in a .env file or the user's profile, and we definitely don't want them in a
mise.toml
The command to load the vars from the service is
phase secrets export --app $PHASE_PROJECT --env development POSTGRES_PASSWORD REDIS_PASSWORD
which returns
So without Mise, we expand those into the shell session with
eval $(phase secrets export --app $PHASE_PROJECT --env development POSTGRES_PASSWORD REDIS_PASSWORD)
- prefacing Mise tasks with this doesn't seem to help.I've tried endless things to try to get Mise to pass those into tasks, but nothing seems to work. Anyone have any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions