From 7f75a39752edee05d62414856706cf5ac39d593e Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Sat, 18 Oct 2014 09:58:49 -0700 Subject: [PATCH] fix powershell error during build --- build.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build.ps1 b/build.ps1 index 102c7bc2c..245b09e82 100644 --- a/build.ps1 +++ b/build.ps1 @@ -69,9 +69,12 @@ Function CleanFolder($path, $keepConfigFiles) Write-Host Removing .less files get-childitem $path -File -Filter *.less -Recurse | foreach ($_) {remove-item $_.fullname} - Write-Host Removing NuGet - Remove-Item -Recurse -Force "$path\NuGet" - + if(Test-Path $$path\NuGet) + { + Write-Host Removing NuGet + Remove-Item -Recurse -Force "$path\NuGet" + } + Write-Host Removing Empty folders while (Get-ChildItem $path -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Test-Path) {