We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7a500a6 + 347e5f4 commit e1d7c70Copy full SHA for e1d7c70
utils/build.ps1
@@ -1678,8 +1678,10 @@ function Build-CMakeProject {
1678
1679
$ArgWithForwardSlashes = $Arg.Replace("\", "/")
1680
if ($ArgWithForwardSlashes.Contains(" ")) {
1681
- # Quote and escape the quote so it makes it through
1682
- $Value += "\""$ArgWithForwardSlashes\"""
+ # Escape the quote so it makes it through. PowerShell 5 and Core
+ # handle quotes differently, so we need to check the version.
1683
+ $quote = if ($PSEdition -eq "Core") { '"' } else { '\"' }
1684
+ $Value += "$quote$ArgWithForwardSlashes$quote"
1685
} else {
1686
$Value += $ArgWithForwardSlashes
1687
}
0 commit comments