Skip to content

Commit 5a2d402

Browse files
committed
Fix error trying to delete non-existing Artifacts dir
1 parent 79f35d7 commit 5a2d402

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Build/build-functions.psm1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ if ($msbuild) {
1010
}
1111

1212
function Remove-ArtifactsDir {
13-
write-host -foreground blue "Clean up...`n"
14-
rm $artifactsDir -Recurse -Force -ErrorAction Stop
15-
write-host -foreground blue "Clean up...END`n"
13+
if (Test-Path $artifactsDir) {
14+
write-host -foreground blue "Clean up...`n"
15+
rm $artifactsDir -Recurse -Force -ErrorAction Stop
16+
write-host -foreground blue "Clean up...END`n"
17+
}
1618
}
1719

1820
function Update-GeneratedCode {

0 commit comments

Comments
 (0)