Skip to content

Commit

Permalink
tools: ci: build: fix path quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienfl-orc committed Nov 9, 2020
1 parent f47d928 commit 4455fb5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/ci/build.ps1
Expand Up @@ -53,7 +53,7 @@ function Build-Orc
[Parameter(Mandatory = $False)]
[ValidateNotNullOrEmpty()]
[System.IO.DirectoryInfo]
$BuildDirectory = "$Source/build",
$BuildDirectory = (Join-Path "${Source}" "build"),
[Parameter(Mandatory = $False)]
[ValidateNotNullOrEmpty()]
[System.IO.DirectoryInfo]
Expand Down Expand Up @@ -89,7 +89,7 @@ function Build-Orc
$Clean
)

$OrcPath = (Resolve-Path -Path $Source).Path
$OrcPath = (Resolve-Path -Path $Source).Path.trim("\")

if(-not $Vcpkg) {
$Vcpkg = "${OrcPath}\external\vcpkg"
Expand All @@ -104,12 +104,12 @@ function Build-Orc

if(-not [System.IO.Path]::IsPathRooted($BuildDirectory))
{
$BuildDirectory = "$OrcPath/$BuildDirectory"
$BuildDirectory = Join-Path "${OrcPath}" "${BuildDirectory}"
}

if(-not [System.IO.Path]::IsPathRooted($Output))
{
$Output = "$OrcPath/$Output"
$Output = Join-Path "$OrcPath" "${Output}"
}

$Generators = @{
Expand Down Expand Up @@ -151,7 +151,7 @@ function Build-Orc

foreach($Arch in $Architecture)
{
$BuildDir = "$BuildDirectory/$Arch"
$BuildDir = Join-Path "${BuildDirectory}" "${Arch}"
if($Clean)
{
Remove-Item -Force -Recurse -Path $BuildDir -ErrorAction Ignore
Expand Down

0 comments on commit 4455fb5

Please sign in to comment.