I've switched to using environment variables for configuration and it works very well - except when I have to deploy or run tasks with capistrano.
Capistrano 3 seems to execute each command prefixed with /usr/bin/env
which erases any environment variables I've set through .bashrc
.
EDIT - on doing some more reasearch, this might not be the issue, the issue might be because capistrano executes as a non-login, non-interactive shell and does not load .bashrc
or .bash_profile
. Still stuck, though.
What would be the best way of making sure the environment vars are set when capistrano executes its tasks?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…