Skip to content

Commit

Permalink
tools: ci: build: check -Clean for error
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienfl-orc committed Nov 9, 2020
1 parent 4b4b4cf commit a4850da
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/ci/build.ps1
Expand Up @@ -156,11 +156,15 @@ function Build-Orc
foreach($Arch in $Architecture)
{
$BuildDir = Join-Path "${BuildDirectory}" "${Arch}"
if($Clean)
if (Test-Path -PathType Container $BuildDir)
{
Remove-Item -Force -Recurse -Path $BuildDir -ErrorAction Ignore
if($Clean)
{
Remove-Item -Force -Recurse -Path $BuildDir
}

New-Item -Force -ItemType Directory -Path $BuildDir | Out-Null
}
New-Item -Force -ItemType Directory -Path $BuildDir | Out-Null

$Generator = $Generators[$Toolchain + "_" + $Arch]

Expand Down

0 comments on commit a4850da

Please sign in to comment.