Run and Exec now use passed in runtime and arch

This commit is contained in:
BrennanConroy 2015-09-10 21:33:54 +00:00 коммит произвёл Brennan
Родитель 42aa577684
Коммит 69bc83e979
2 изменённых файлов: 17 добавлений и 5 удалений

Просмотреть файл

@ -1598,7 +1598,7 @@ function dnvm-run {
[Parameter(Mandatory=$false, Position=1, ValueFromRemainingArguments=$true)] [Parameter(Mandatory=$false, Position=1, ValueFromRemainingArguments=$true)]
[object[]]$DnxArguments) [object[]]$DnxArguments)
$runtimeInfo = Get-RuntimeAliasOrRuntimeInfo -Version:$VersionOrAlias $runtimeInfo = Get-RuntimeAliasOrRuntimeInfo -Version:$VersionOrAlias -Runtime:$Runtime -Architecture:$Architecture
$runtimeBin = Get-RuntimePath $runtimeInfo.RuntimeName $runtimeBin = Get-RuntimePath $runtimeInfo.RuntimeName
if ($runtimeBin -eq $null) { if ($runtimeBin -eq $null) {
@ -1639,7 +1639,7 @@ function dnvm-exec {
[Parameter(Mandatory=$false, Position=2, ValueFromRemainingArguments=$true)] [Parameter(Mandatory=$false, Position=2, ValueFromRemainingArguments=$true)]
[object[]]$Arguments) [object[]]$Arguments)
$runtimeInfo = Get-RuntimeAliasOrRuntimeInfo -Version:$VersionOrAlias $runtimeInfo = Get-RuntimeAliasOrRuntimeInfo -Version:$VersionOrAlias -Runtime:$Runtime -Architecture:$Architecture
$runtimeBin = Get-RuntimePath $runtimeInfo.RuntimeName $runtimeBin = Get-RuntimePath $runtimeInfo.RuntimeName
if ($runtimeBin -eq $null) { if ($runtimeBin -eq $null) {

Просмотреть файл

@ -684,9 +684,9 @@ dnvm()
local arch= local arch=
local runtime= local runtime=
local versionOrAlias=
shift shift
if [ $cmd == "use" ]; then if [ $cmd == "use" ]; then
local versionOrAlias=
while [ $# -ne 0 ] while [ $# -ne 0 ]
do do
if [[ $1 == "-p" || $1 == "-persistent" ]]; then if [[ $1 == "-p" || $1 == "-persistent" ]]; then
@ -706,8 +706,20 @@ dnvm()
shift shift
done done
else else
local versionOrAlias=$1 while [ $# -ne 0 ]
shift do
if [[ $1 == "-a" || $1 == "-arch" ]]; then
local arch=$2
shift
elif [[ $1 == "-r" || $1 == "-runtime" ]]; then
local runtime=$2
shift
elif [[ -n $1 ]]; then
[[ -n $versionOrAlias ]] && break
local versionOrAlias=$1
fi
shift
done
fi fi
if [[ $cmd == "use" && $versionOrAlias == "none" ]]; then if [[ $cmd == "use" && $versionOrAlias == "none" ]]; then