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

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

@ -684,9 +684,9 @@ dnvm()
local arch=
local runtime=
local versionOrAlias=
shift
if [ $cmd == "use" ]; then
local versionOrAlias=
while [ $# -ne 0 ]
do
if [[ $1 == "-p" || $1 == "-persistent" ]]; then
@ -706,8 +706,20 @@ dnvm()
shift
done
else
local versionOrAlias=$1
shift
while [ $# -ne 0 ]
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
if [[ $cmd == "use" && $versionOrAlias == "none" ]]; then