diff --git a/dnvm.ps1 b/dnvm.ps1 index bbe40aa628..138903ba56 100644 --- a/dnvm.ps1 +++ b/dnvm.ps1 @@ -67,7 +67,7 @@ function _WriteOut { ### Constants $ProductVersion="1.0.0" -$BuildVersion="beta8-15515" +$BuildVersion="beta8-15516" $Authors="Microsoft Open Technologies, Inc." # If the Version hasn't been replaced... @@ -1610,6 +1610,7 @@ function dnvm-run { } _WriteDebug "> $dnxExe $DnxArguments" & $dnxExe @DnxArguments + $Script:ExitCode = $LASTEXITCODE } <# @@ -1651,6 +1652,7 @@ function dnvm-exec { $env:PATH = "$runtimeBin;$($env:PATH)" & $Command @Arguments } finally { + $Script:ExitCode = $LASTEXITCODE $env:PATH = $oldPath } } diff --git a/dnvm.sh b/dnvm.sh index 6cb8631a58..8adfc87ace 100644 --- a/dnvm.sh +++ b/dnvm.sh @@ -2,7 +2,7 @@ # Source this file from your .bash-profile or script to use # "Constants" -_DNVM_BUILDNUMBER="beta8-15515" +_DNVM_BUILDNUMBER="beta8-15516" _DNVM_AUTHORS="Microsoft Open Technologies, Inc." _DNVM_RUNTIME_PACKAGE_NAME="dnx" _DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment" @@ -747,6 +747,7 @@ dnvm() local hostpath="$runtimeBin/dnx" if [[ -e $hostpath ]]; then $hostpath $@ + return $? else echo "Cannot find $_DNVM_RUNTIME_SHORT_NAME in $runtimeBin. It may have been corrupted. Use '$_DNVM_COMMAND_NAME install $versionOrAlias -f' to attempt to reinstall it" fi @@ -757,6 +758,7 @@ dnvm() PATH=$(__dnvm_prepend_path "$PATH" "$runtimeBin") $@ ) + return $? ;; "use") echo "Adding" $runtimeBin "to process PATH"