Skip to content

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

@MitchMcHenry1

Description

@MitchMcHenry1

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions