diff --git a/dnvm.ps1 b/dnvm.ps1 index a0d955063d..a0937cc342 100644 --- a/dnvm.ps1 +++ b/dnvm.ps1 @@ -67,7 +67,7 @@ function _WriteOut { ### Constants $ProductVersion="1.0.0" -$BuildVersion="beta5-10374" +$BuildVersion="beta5-10375" $Authors="Microsoft Open Technologies, Inc." # If the Version hasn't been replaced... @@ -1148,12 +1148,15 @@ function dnvm-install { Write-Progress -Activity "Installing runtime" "Unpacking runtime" -Id 1 Unpack-Package $DownloadFile $UnpackFolder - New-Item -Type Directory $RuntimeFolder -Force | Out-Null - _WriteOut "Installing to $RuntimeFolder" - _WriteDebug "Moving package contents to $RuntimeFolder" - Move-Item "$UnpackFolder\*" $RuntimeFolder - _WriteDebug "Cleaning temporary directory $UnpackFolder" - Remove-Item $UnpackFolder -Force | Out-Null + if(Test-Path $RuntimeFolder) { + # Ensure the runtime hasn't been installed in the time it took to download the package. + _WriteOut "'$runtimeFullName' is already installed." + } + else { + _WriteOut "Installing to $RuntimeFolder" + _WriteDebug "Moving package contents to $RuntimeFolder" + Move-Item $UnpackFolder $RuntimeFolder + } dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime -Persistent:$Persistent diff --git a/dnvm.sh b/dnvm.sh index 09ec229923..cc5a5cd3fc 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="beta5-10374" +_DNVM_BUILDNUMBER="beta5-10375" _DNVM_AUTHORS="Microsoft Open Technologies, Inc." _DNVM_RUNTIME_PACKAGE_NAME="dnx" _DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"