Fix DNX Core testing on Windows

- avoid `cmd /C dnvm.cmd ...` because `cmd` does not report `.cmd` script exit code correctly
  - change both `_dnu.shade` and `_k.shade` though `_k.shade` is more-often an issue
- @moozzyk reported problem in [discussion](https://github.com/aspnet/Universe/pull/299#discussion-diff-41954492) of PR #299
This commit is contained in:
Doug Bunting 2015-10-17 18:04:30 -07:00
parent 0ea0a44e15
commit 207e97db7a
2 changed files with 17 additions and 9 deletions

View File

@ -1,19 +1,23 @@
@{/*
dnu
Run dnu commands in your project. Executes dnu command.
Run dnu commands in your project. Executes `dnu` command.
command=''
The `dnu` subcommand to execute.
dnvmUse=''
Optional. The DNX framework to use. Suitable for a `dnvm exec` command.
Optional. The DNX framework to use. Suitable for a `dnvm exec` or `dnvm use` command.
*/}
default dnvmUse=''
var dnvmPath = '${ Path.Combine(Directory.GetCurrentDirectory(), "packages", "KoreBuild", "build", "dnvm") }'
exec program='cmd' commandline='/C dnu ${command}' if='!IsLinux && string.IsNullOrEmpty(dnvmUse)'
exec program='cmd' commandline='/C "${dnvmPath}" exec ${dnvmUse} dnu ${command}' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)'
var cmdCommand = '/S /C ""${dnvmPath}.cmd" use ${dnvmUse} && dnu ${command}"'
exec program='cmd' commandline='${ cmdCommand }' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)'
exec program='dnu' commandline='${command}' if='IsLinux && string.IsNullOrEmpty(dnvmUse)'
var commandLine = 'bash -c ". \"${dnvmPath}.sh\"; dnvm exec ${dnvmUse} dnu ${command}"'
exec program='/usr/bin/env' commandline='${ commandLine }' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)'
var envCommand = 'bash -c "source \"${dnvmPath}.sh\" && dnvm use ${dnvmUse} && dnu ${command}"'
exec program='/usr/bin/env' commandline='${ envCommand }' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)'

View File

@ -8,7 +8,7 @@ command=''
dnxDir=''
Optional. The directory in which to execute the `dnx` command.
dnvmUse=''
Optional. The DNX framework to use. Suitable for a `dnvm run` command.
Optional. The DNX framework to use. Suitable for a `dnvm run` or `dnvm use` command.
*/}
default currentDir = '${Directory.GetCurrentDirectory()}'
@ -18,7 +18,11 @@ default dnvmUse=''
var dnvmPath = '${ Path.Combine(Directory.GetCurrentDirectory(), "packages", "KoreBuild", "build", "dnvm") }'
exec program='cmd' commandline='/C dnx ${command}' workingdir='${dnxDir}' if='!IsLinux && string.IsNullOrEmpty(dnvmUse)'
exec program='cmd' commandline='/C "${dnvmPath}" run ${dnvmUse} ${command}' workingdir='${dnxDir}' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)'
var cmdCommand = '/S /C ""${dnvmPath}.cmd" use ${dnvmUse} && dnx ${command}"'
exec program='cmd' commandline='${ cmdCommand }' workingdir='${dnxDir}' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)'
exec program='dnx' commandline='${command}' workingdir='${dnxDir}' if='IsLinux && string.IsNullOrEmpty(dnvmUse)'
var commandLine = 'bash -c ". \"${dnvmPath}.sh\"; dnvm run ${dnvmUse} ${command}"'
exec program='/usr/bin/env' commandline='${ commandLine }' workingdir='${dnxDir}' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)'
var envCommand = 'bash -c "source \"${dnvmPath}.sh\" && dnvm use ${dnvmUse} && dnx ${command}"'
exec program='/usr/bin/env' commandline='${ envCommand }' workingdir='${dnxDir}' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)'