Skip to content

Commit

Permalink
Merge pull request conda#7042 from njalerikson/csh-return
Browse files Browse the repository at this point in the history
Handle non-zero return in CSH
  • Loading branch information
kalefranz authored Mar 22, 2018
2 parents 8dfeca3 + 09febb0 commit 21ffc46
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions conda/shell/etc/profile.d/conda.csh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,19 @@ if ("`alias conda`" == "") then
else
switch ( "${1}" )
case "activate":
eval "`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh activate '${2}' ${argv[3-]})`"
set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh activate '${2}' ${argv[3-]})`" || exit ${status}
eval "${ask_conda}"
rehash
breaksw
case "deactivate":
eval "`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh deactivate '${2}' ${argv[3-]})`"
set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh deactivate '${2}' ${argv[3-]})`" || exit ${status}
eval "${ask_conda}"
rehash
breaksw
case "install" | "update" | "uninstall" | "remove":
$_CONDA_EXE $argv[1-]
eval "`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh reactivate)`"
set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh reactivate)`" || exit ${status}
eval "${ask_conda}"
rehash
breaksw
default:
Expand Down

0 comments on commit 21ffc46

Please sign in to comment.