When running this script, I run into an error on this line (relevant snippet below):
...
_NEW_PATH=$("$_THIS_DIR/conda" ..activate "$@")
if (( $? == 0 )); then
export PATH=$_NEW_PATH
# If the string contains / it's a path
if [[ "$@" == */* ]]; then
export CONDA_DEFAULT_ENV=$(get_abs_filename "$@")
else
export CONDA_DEFAULT_ENV="$@"
fi
# ==== The next line returns an error
# ==== with the message: "export: not valid in this context /Users/avazquez/anaconda3"
export CONDA_ENV_PATH=$(get_dirname $_THIS_DIR)
if (( $("$_THIS_DIR/conda" ..changeps1) )); then
CONDA_OLD_PS1="$PS1"
PS1="($CONDA_DEFAULT_ENV)$PS1"
fi
else
return $?
fi
...
Why is that? I found this ticket, but I don't have that syntax error.
I found reports of the same problem in GitHub threads (e.g. here) and mailing lists (e.g. here)
PATH=$_NEW_PATH; export PATH
? – cuonglm Jun 10 '15 at 02:41