JetBrains/meta-runner-power-pack

xUnit.net + dotCover meta-runner fails with space in working folder path

MitchMcHenry1 opened this issue · 0 comments

The current approach to using Invoke-Expression to launch nuget, xunit and dotCover exe's will fail if there is a space in the working folder path. It can be fixed by using call operator "&" and single quoted paths in conjunction with Invoke-Expression. Examples below with original code commented out followed by fixed code:

NuGet:

#Invoke-Expression "$nugetExe install xunit.runner.console -source $xUnitNuget"
Invoke-Expression "& '$nugetExe' install xunit.runner.console -source $xUnitNuget"

xUnit:

#$xunitOnlyCommand = "$xunit $xunitArg"
$xunitOnlyCommand = "& '$xunit' $xunitArg"

dotCover:

#$command = "$dotCover $dotCoverArgs"
$command = "& '$dotCover' $dotCoverArgs"