Skip to content

Commit c9122c3

Browse files
ASP.NET Push Botunknown
authored andcommitted
⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@dbd7367
1 parent 68a8e3e commit c9122c3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

dnvm.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function _WriteOut {
6767

6868
### Constants
6969
$ProductVersion="1.0.0"
70-
$BuildVersion="beta7-10406"
70+
$BuildVersion="beta7-10407"
7171
$Authors="Microsoft Open Technologies, Inc."
7272

7373
# If the Version hasn't been replaced...

dnvm.sh

Lines changed: 6 additions & 2 deletions
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="beta7-10406"
5+
_DNVM_BUILDNUMBER="beta7-10407"
66
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
77
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
88
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"
@@ -736,6 +736,10 @@ dnvm()
736736
[[ ! -d $_DNVM_USER_PACKAGES ]] && echo "$_DNVM_RUNTIME_FRIENDLY_NAME is not installed." && return 1
737737

738738
local searchGlob="$_DNVM_RUNTIME_PACKAGE_NAME-*"
739+
local runtimes=$(find $_DNVM_USER_PACKAGES -name "$searchGlob" \( -type d -or -type l \) -prune -exec basename {} \; | sort -t. -k2 -k3 -k4 -k1)
740+
741+
[[ -z $runtimes ]] && echo 'No runtimes installed. You can run `dnvm install latest` or `dnvm upgrade` to install a runtime.' && return
742+
739743
echo ""
740744

741745
# Separate empty array declaration from initialization
@@ -764,7 +768,7 @@ dnvm()
764768
fi
765769

766770
local formattedHome=`(echo $_DNVM_USER_PACKAGES | sed s=$HOME=~=g)`
767-
for f in $(find $_DNVM_USER_PACKAGES -name "$searchGlob" \( -type d -or -type l \) -prune -exec basename {} \; | sort -t. -k2 -k3 -k4 -k1); do
771+
for f in $runtimes; do
768772
local active=""
769773
[[ $PATH == *"$_DNVM_USER_PACKAGES/$f/bin"* ]] && local active=" *"
770774
local pkgRuntime=$(__dnvm_package_runtime "$f")

0 commit comments

Comments
 (0)