DrLulz Posted March 9, 2015 Share Posted March 9, 2015 I have an executable located at ~/Documents/anki/runanki echo $PATH = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin I created an alias in .bash_profile, but I know from searching that Alfred doesn't load the local environment. I would like to call runanki from a run script, but can't figure it out. I don't really care about using the alias in Alfred. Have tried the following, all of which work in the terminal. What is my hangup? /Users/drlulz/Documents/anki/runanki cd ~/Documents/anki runanki shopt -s expand_aliases if [ -f "${HOME}/.bash_profile" ] ; then source "${HOME}/.bash_profile" fi runanki Link to comment
deanishe Posted March 9, 2015 Share Posted March 9, 2015 It could be lots of things. Try running the program with env -i runanki to simulate the empty environment. Link to comment
DrLulz Posted March 10, 2015 Author Share Posted March 10, 2015 It could be lots of things. Try running the program with env -i runanki to simulate the empty environment. Result from terminal. Is this my issue? : drlulz$ env -i runanki env: runanki: No such file or directory Link to comment
deanishe Posted March 10, 2015 Share Posted March 10, 2015 That won't work because /Users/drlulz/Documents/anki isn't part of your $PATH… Either use the full path to runanki or cd to ~/Documents/anki first and do env -i ./runanki. You are actually using the full path to the runanki executable in your workflow script, aren't you? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now