dnvm run and dnvm exec do not pass a non-0 exit code from dnx back to the shell. (Side note: This and the _k-test.shade / _k.shade approach means DNX Core tests on Windows can fail without ending the build.)
Repro steps
create a simple Console application that always fails
dnu restore
dnx run
echo %ErrorLevel%`
observe expected 1
dnvm run default run or dnvm exec default dnx run
echo %ErrorLevel%
observe unexpected0
Example program
namespace ExitCode
{
public class Program
{
public int Main(string[] args)
{
return 1;
}
}
}
dnvm run
anddnvm exec
do not pass a non-0
exit code fromdnx
back to the shell. (Side note: This and the_k-test.shade
/_k.shade
approach means DNX Core tests on Windows can fail without ending the build.)Repro steps
dnu restore
dnx run
1
dnvm run default run
ordnvm exec default dnx run
echo %ErrorLevel%
0
Example program