Skip to content

Commit 39c901e

Browse files
ASP.NET Push Botunknown
authored andcommitted
⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@66364c7
1 parent 86c7501 commit 39c901e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

dnvm.ps1

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function _WriteOut {
6767

6868
### Constants
6969
$ProductVersion="1.0.0"
70-
$BuildVersion="rc1-15526"
70+
$BuildVersion="rc1-15527"
7171
$Authors="Microsoft Open Technologies, Inc."
7272

7373
# If the Version hasn't been replaced...
@@ -846,6 +846,14 @@ function Is-Elevated() {
846846
return $user.IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
847847
}
848848

849+
function Get-ScriptRoot() {
850+
if ($PSVersionTable.PSVersion.Major -ge 3) {
851+
return $PSScriptRoot
852+
}
853+
854+
return Split-Path $script:MyInvocation.MyCommand.Path -Parent
855+
}
856+
849857
### Commands
850858

851859
<#
@@ -863,9 +871,10 @@ function dnvm-update-self {
863871
$wc = New-Object System.Net.WebClient
864872
Apply-Proxy $wc -Proxy:$Proxy
865873

866-
$dnvmFile = Join-Path $PSScriptRoot "dnvm.ps1"
867-
$tempDnvmFile = Join-Path $PSScriptRoot "temp"
868-
$backupFilePath = Join-Path $PSSCriptRoot "dnvm.ps1.bak"
874+
$CurrentScriptRoot = Get-ScriptRoot
875+
$dnvmFile = Join-Path $CurrentScriptRoot "dnvm.ps1"
876+
$tempDnvmFile = Join-Path $CurrentScriptRoot "temp"
877+
$backupFilePath = Join-Path $CurrentScriptRoot "dnvm.ps1.bak"
869878

870879
$wc.DownloadFile($DNVMUpgradeUrl, $tempDnvmFile)
871880

dnvm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Source this file from your .bash-profile or script to use
33

44
# "Constants"
5-
_DNVM_BUILDNUMBER="rc1-15526"
5+
_DNVM_BUILDNUMBER="rc1-15527"
66
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
77
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
88
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"

0 commit comments

Comments
 (0)