From 3f55abaf591af822a7babd1e5b5b74ca10c23070 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sat, 9 Sep 2017 16:48:13 +0200 Subject: [PATCH] Create directories only when they don't exist --- build/Modules/Umbraco.Build/Umbraco.Build.psm1 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build/Modules/Umbraco.Build/Umbraco.Build.psm1 b/build/Modules/Umbraco.Build/Umbraco.Build.psm1 index 24960589e8..042cdc70d6 100644 --- a/build/Modules/Umbraco.Build/Umbraco.Build.psm1 +++ b/build/Modules/Umbraco.Build/Umbraco.Build.psm1 @@ -232,12 +232,19 @@ function Prepare-Tests # data Write-Host "Copy data files" - mkdir "$tmp\tests\Packaging" > $null + if( -Not (Test-Path -Path "$tmp\tests\Packaging" ) ) + { + Write-Host "Create packaging directory" + New-Item -ItemType directory -Path "$tmp\tests\Packaging" + } Copy-Files "$src\Umbraco.Tests\Packaging\Packages" "*" "$tmp\tests\Packaging\Packages" # required for package install tests - Write-Host "Create bin directory" - mkdir "$tmp\tests\bin" > $null + if( -Not (Test-Path -Path "$tmp\tests\bin" ) ) + { + Write-Host "Create bin directory" + New-Item -ItemType directory -Path "$tmp\tests\bin" + } } #