Jump to content

Help about environmental variables after upgraded to Alfred 5

Recommended Posts

Hey everyone!


Upgraded to Alfred 5 recently. The new tools in workflow are great. 

But there's one problem to me, I could not get the values of some system environmental variables anymore in Run Script (bash/zsh/python).

Variables $HOME, $PATH, $SHELL etc were shown in debugging console without any problem

but if I try things like $JAVA_HOME and $SSH_AUTH_SOCK, these values are empty. (`export` in terminal shows the values.)


Alfred 4 works fine.


Anyone who has ideas?

Thanks and appreciated for any help!

Edited by vaporpipe
Link to comment

Welcome @vaporpipe,


By design, Alfred doesn’t read your shell’s startup files. Only some of the variables are set, to make the environment more consistent across installs. That is important for debugging and sharing Workflows, as well as more stable in general. Alfred 4 would read those only in special circumstances, the current behaviour of reading less is intended.

If you need those extra variables, you can set them in the Run Script or source the relevant files (e.g. source "${HOME}/.zshrc").

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...