Getting tests to run from build directory with spaces in it (#1981)

* [build.psm1] - mc.exe input file needs quotes

For filenames that have spaces or paths to that file that have spaces, the input filename needs to have quotes around it.

* Quoted more paths so tests run from directories with spaces

Found a few locations where paths weren't qutoed or escaped with '& ...' that are needed to get tests to run from build directories with spaces in them.
This commit is contained in:
Barry Nolte authored and Andy Schwartzmeyer committed 2016-08-22 09:57:30 -04:00
1 parent bb9a40c6ac
commit 890e80dd54
3 files changed
+10 -10

No files matched your search

+3 -3
View File
@@ -568,7 +568,7 @@ function Start-PSPester {
}
$PesterModule = [IO.Path]::Combine((Split-Path $powershell), "Modules", "Pester")
$Command += "Import-Module $PesterModule; "
$Command += "Import-Module '$PesterModule'; "
$Command += "Invoke-Pester "
$Command += "-OutputFormat ${OutputFormat} -OutputFile ${OutputFile} "
@@ -582,8 +582,8 @@ function Start-PSPester {
$Command += "-Tag @('" + (${Tag} -join "','") + "') "
}
$Command += $Path
$Command += "'" + $Path + "'"
Write-Verbose $Command
# To ensure proper testing, the module path must not be inherited by the spawned process
try {