Skip to content

Commit 36968d5

Browse files
ASP.NET Push Botunknown
authored andcommitted
⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@16530be
1 parent d051776 commit 36968d5

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
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="rc1-15520"
70+
$BuildVersion="rc1-15522"
7171
$Authors="Microsoft Open Technologies, Inc."
7272

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

dnvm.sh

Lines changed: 15 additions & 6 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="rc1-15520"
5+
_DNVM_BUILDNUMBER="rc1-15522"
66
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
77
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
88
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"
@@ -483,7 +483,7 @@ __dnvm_help() {
483483
echo " <alias> the name of the alias to set"
484484
echo " <semver>|<alias>|<package> the $_DNVM_RUNTIME_SHORT_NAME version to set the alias to. Alternatively use the version of the specified alias"
485485
echo ""
486-
printf "%b\n" "${Yel}$_DNVM_COMMAND_NAME unalias <alias> ${RCol}"
486+
printf "%b\n" "${Yel}$_DNVM_COMMAND_NAME alias [-d|-delete] <alias> ${RCol}"
487487
echo " remove the specified alias"
488488
echo ""
489489
printf "%b\n" "${Yel}$_DNVM_COMMAND_NAME [help|-h|-help|--help] ${RCol}"
@@ -876,6 +876,16 @@ dnvm()
876876
return
877877
fi
878878
shift
879+
880+
if [[ $1 == "-d" || $1 == "-delete" ]]; then
881+
local name=$2
882+
local aliasPath="$_DNVM_ALIAS_DIR/$name.alias"
883+
[[ ! -e "$aliasPath" ]] && echo "Cannot remove alias, '$name' is not a valid alias name" && return 1
884+
echo "Removing alias $name"
885+
rm "$aliasPath" >> /dev/null 2>&1
886+
return
887+
fi
888+
879889
local name="$1"
880890

881891
if [[ $# == 1 ]]; then
@@ -917,10 +927,9 @@ dnvm()
917927
[[ $# -ne 2 ]] && __dnvm_help && return
918928

919929
local name=$2
920-
local aliasPath="$_DNVM_ALIAS_DIR/$name.alias"
921-
[[ ! -e "$aliasPath" ]] && echo "Cannot remove alias, '$name' is not a valid alias name" && return 1
922-
echo "Removing alias $name"
923-
rm "$aliasPath" >> /dev/null 2>&1
930+
echo "This command has been deprecated. Use '$_DNVM_COMMAND_NAME alias -d' instead"
931+
$_DNVM_COMMAND_NAME alias -d $name
932+
return $?
924933
;;
925934

926935
"list" )

0 commit comments

Comments
 (0)