raguay.customct Posted March 8, 2013 Share Posted March 8, 2013 Hi, It seems that Alfred does not contain the full environment (ie: the path is not right, environment variables for compilers are not set, etc). I have to source my .zshrc file in a zsh script in order to have a full environment. But, under PHP and Python, I can not seem to get the environment set good. Is it possible for Alfred to have more of the environment setup or should we always plan on it not being there and figure out how to get it right? Thanks. Richard Link to comment
jdfwarrior Posted March 8, 2013 Share Posted March 8, 2013 What variables are you not getting access to? I know some are available because in my PHP utility class that I use, I set paths that include the users home folder in them by grabbing the value of $HOME and saving it into a variable. Link to comment
ctwise Posted March 8, 2013 Share Posted March 8, 2013 What variables are you not getting access to? I know some are available because in my PHP utility class that I use, I set paths that include the users home folder in them by grabbing the value of $HOME and saving it into a variable. See this discussion - http://www.alfredforum.com/topic/433-provide-login-session-option-for-bash-scripts/?hl=environment The simplest example is PATH. It's there, but it's a truncated path that doesn't include whatever you set in your initialization scripts. If you set things like JAVA_HOME or whatever else, they won't be there either. This shouldn't be the default behavior, the existing approach is correct. But it would be useful to be able to request a login shell environment when needed. Link to comment
jdfwarrior Posted March 8, 2013 Share Posted March 8, 2013 See this discussion - http://www.alfredforum.com/topic/433-provide-login-session-option-for-bash-scripts/?hl=environment The simplest example is PATH. It's there, but it's a truncated path that doesn't include whatever you set in your initialization scripts. If you set things like JAVA_HOME or whatever else, they won't be there either. This shouldn't be the default behavior, the existing approach is correct. But it would be useful to be able to request a login shell environment when needed. Gotcha, yeah I remember that convo now. Old age is getting to me ha Link to comment
raguay.customct Posted March 11, 2013 Author Share Posted March 11, 2013 Gotcha, yeah I remember that convo now. Old age is getting to me ha Your not old....yet! But, I use oh-my-zsh to setup my environment. All variables that I set inside of the custom section do not get set. I am trying to write a workflow to launch different test servers, the the servers are not finding the environment they need. I guess I will have to create a zsh script file for each server from PHP. Link to comment
Recommended Posts