Skip to content

Commit b7c4833

Browse files
authored
Fix build script to not create a folder multiple times (#266)
1 parent aea18c8 commit b7c4833

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.psm1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ function Copy-1PFilesToSign
346346
Copy-Item -Path $file.FullName -Destination $TargetRoot
347347
} else {
348348
$targetParent = $parent.Replace($SourceRoot, $TargetRoot)
349-
$null = mkdir -Path $targetParent
349+
if (-not (Test-Path $targetParent)) {
350+
$null = mkdir -Path $targetParent
351+
}
350352
Copy-Item -Path $file.FullName -Destination $targetParent
351353
}
352354
}
@@ -389,7 +391,9 @@ function Copy-3PFilesToSign
389391
Copy-Item -Path $file.FullName -Destination $TargetRoot
390392
} else {
391393
$targetParent = $parent.Replace($SourceRoot, $TargetRoot)
392-
$null = mkdir -Path $targetParent
394+
if (-not (Test-Path $targetParent)) {
395+
$null = mkdir -Path $targetParent
396+
}
393397
Copy-Item -Path $file.FullName -Destination $targetParent
394398
}
395399
}

0 commit comments

Comments
 (0)