Skip to content

Commit 9992c4a

Browse files
ASP.NET Push Botunknown
authored andcommitted
⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@c964d0f
1 parent 8c3dd15 commit 9992c4a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
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="beta8-15509"
70+
$BuildVersion="beta8-15510"
7171
$Authors="Microsoft Open Technologies, Inc."
7272

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

dnvm.sh

Lines changed: 9 additions & 7 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="beta8-15509"
5+
_DNVM_BUILDNUMBER="beta8-15510"
66
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
77
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
88
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"
@@ -778,7 +778,7 @@ dnvm()
778778
local name="$1"
779779

780780
if [[ $# == 1 ]]; then
781-
[[ ! -e "$_DNVM_ALIAS_DIR/$name.alias" ]] && echo "There is no alias called '$name'" && return
781+
[[ ! -e "$_DNVM_ALIAS_DIR/$name.alias" ]] && echo "There is no alias called '$name'" && return 1
782782
cat "$_DNVM_ALIAS_DIR/$name.alias"
783783
echo ""
784784
return
@@ -832,10 +832,12 @@ dnvm()
832832
local runtimes=""
833833
for location in `echo $DNX_HOME | tr ":" "\n"`; do
834834
location+="/runtimes"
835-
local oruntimes="$(find $location -name "$searchGlob" \( -type d -or -type l \) -prune -exec basename {} \;)"
836-
for v in `echo $oruntimes | tr "\n" " "`; do
837-
runtimes+="$v:$location"$'\n'
838-
done
835+
if [ -d "$location" ]; then
836+
local oruntimes="$(find $location -name "$searchGlob" \( -type d -or -type l \) -prune -exec basename {} \;)"
837+
for v in `echo $oruntimes | tr "\n" " "`; do
838+
runtimes+="$v:$location"$'\n'
839+
done
840+
fi
839841
done
840842

841843
[[ -z $runtimes ]] && echo 'No runtimes installed. You can run `dnvm install latest` or `dnvm upgrade` to install a runtime.' && return
@@ -939,4 +941,4 @@ dnvm()
939941
[[ ":$PATH:" != *":$DNX_USER_HOME/bin:"* ]] && export PATH="$DNX_USER_HOME/bin:$PATH"
940942

941943
# Generate the command function using the constant defined above.
942-
$_DNVM_COMMAND_NAME list default >/dev/null && $_DNVM_COMMAND_NAME use default >/dev/null || true
944+
$_DNVM_COMMAND_NAME alias default >/dev/null && $_DNVM_COMMAND_NAME use default >/dev/null || true

0 commit comments

Comments
 (0)