Skip to content

Commit a06c4a2

Browse files
ASP.NET Push Botunknown
authored andcommitted
⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@e153393
1 parent 1f80539 commit a06c4a2

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
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="beta6-10394"
70+
$BuildVersion="beta6-10395"
7171
$Authors="Microsoft Open Technologies, Inc."
7272

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

dnvm.sh

Lines changed: 17 additions & 10 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="beta6-10394"
5+
_DNVM_BUILDNUMBER="beta6-10395"
66
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
77
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
88
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"
@@ -14,7 +14,6 @@ _DNVM_VERSION_MANAGER_NAME=".NET Version Manager"
1414
_DNVM_DEFAULT_FEED="https://www.nuget.org/api/v2"
1515
_DNVM_DEFAULT_UNSTABLE_FEED="https://www.myget.org/F/aspnetvnext/api/v2"
1616
_DNVM_UPDATE_LOCATION="https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.sh"
17-
_DNVM_HOME_VAR_NAME="DNX_HOME"
1817

1918
if [ "$NO_COLOR" != "1" ]; then
2019
# ANSI Colors
@@ -47,6 +46,11 @@ if [ -z "$DNX_USER_HOME" ]; then
4746
eval DNX_USER_HOME="~/$_DNVM_RUNTIME_FOLDER_NAME"
4847
fi
4948

49+
if [ -z "$DNX_HOME" ]; then
50+
# Set to the user home value
51+
DNX_HOME="$DNX_USER_HOME"
52+
fi
53+
5054
_DNVM_USER_PACKAGES="$DNX_USER_HOME/runtimes"
5155
_DNVM_ALIAS_DIR="$DNX_USER_HOME/alias"
5256
_DNVM_DNVM_DIR="$DNX_USER_HOME/dnvm"
@@ -75,7 +79,7 @@ __dnvm_find_latest() {
7579
printf "%b\n" "${Red}$_DNVM_COMMAND_NAME needs curl to proceed. ${RCol}" >&2;
7680
return 1
7781
fi
78-
82+
7983
if [[ $platform == "mono" ]]; then
8084
#dnx-mono
8185
local packageId="$_DNVM_RUNTIME_PACKAGE_NAME-$platform"
@@ -161,7 +165,7 @@ __dnvm_download() {
161165
printf "%b\n" "${Gre}$runtimeFullName already installed. ${RCol}"
162166
return 0
163167
fi
164-
168+
165169
if ! __dnvm_has "curl"; then
166170
printf "%b\n" "${Red}$_DNVM_COMMAND_NAME needs curl to proceed. ${RCol}" >&2;
167171
return 1
@@ -273,15 +277,15 @@ __dnvm_description() {
273277
printf "%b\n" "${Yel}Current feed settings:${RCol}"
274278
printf "%b\n" "${Cya}Default Stable:${Yel} $_DNVM_DEFAULT_FEED"
275279
printf "%b\n" "${Cya}Default Unstable:${Yel} $_DNVM_DEFAULT_UNSTABLE_FEED"
276-
280+
277281
local dnxStableOverride="<none>"
278282
[[ -n $DNX_FEED ]] && dnxStableOverride="$DNX_FEED"
279283

280284
printf "%b\n" "${Cya}Current Stable Override:${Yel} $dnxStableOverride"
281-
285+
282286
local dnxUnstableOverride="<none>"
283287
[[ -n $DNX_UNSTABLE_FEED ]] && dnxUnstableOverride="$DNX_UNSTABLE_FEED"
284-
288+
285289
printf "%b\n" "${Cya}Current Unstable Override:${Yel} $dnxUnstableOverride${RCol}"
286290
echo ""
287291

@@ -406,17 +410,17 @@ dnvm()
406410
elif [[ $1 == "-arch" ]]; then
407411
local arch=$2
408412
shift
409-
413+
410414
if [[ $arch != "x86" && $arch != "x64" ]]; then
411415
printf "%b\n" "${Red}Architecture must be x86 or x64.${RCol}"
412416
return 1
413417
fi
414-
418+
415419
if [[ $arch == "x86" && $runtime == "coreclr" ]]; then
416420
printf "%b\n" "${Red}Core CLR doesn't currently have a 32 bit build. You must use x64.${RCol}"
417421
return 1
418422
fi
419-
423+
420424
elif [[ -n $1 ]]; then
421425
[[ -n $versionOrAlias ]] && echo "Invalid option $1" && __dnvm_help && return 1
422426
local versionOrAlias=$1
@@ -697,5 +701,8 @@ dnvm()
697701
return 0
698702
}
699703

704+
# Add the home location's bin directory to the path
705+
export PATH="$DNX_HOME/bin:$PATH"
706+
700707
# Generate the command function using the constant defined above.
701708
$_DNVM_COMMAND_NAME list default >/dev/null && $_DNVM_COMMAND_NAME use default >/dev/null || true

0 commit comments

Comments
 (0)