Commit 69bdca06 authored by Kenneth Reitz's avatar Kenneth Reitz

fix sub-env for when env file is not present

parent 63cea994
......@@ -60,5 +60,9 @@ function deep-rm (){
}
function sub-env (){
(export $(egrep -v '^(GIT_DIR|PYTHONHOME|PYTHONPATH|LD_LIBRARY_PATH|LIBRARY_PATH|PATH)' $ENV_FILE); $1)
if [[ -f $ENV_FILE ]]; then
(export $(egrep -v '^(GIT_DIR|PYTHONHOME|PYTHONPATH|LD_LIBRARY_PATH|LIBRARY_PATH|PATH)' -f $ENV_FILE); $1)
else
$1
fi
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment