From 1da8337562a30911e478adba9643eebaba5c7024 Mon Sep 17 00:00:00 2001 From: Steve Otteson Date: Fri, 20 Nov 2020 16:40:36 -0800 Subject: [PATCH] Make sure bin dir exists before using it --- scripts/CommonUtils.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/CommonUtils.ps1 b/scripts/CommonUtils.ps1 index 9db997e1..a4a0342e 100644 --- a/scripts/CommonUtils.ps1 +++ b/scripts/CommonUtils.ps1 @@ -26,4 +26,12 @@ $toolsDir = "$rootDir\tools" $binDir = "$rootDir\bin" $sourcesDir = "$rootDir\sources" +if (Test-Path -Path $binDir -PathType leaf) +{ + Remove-Item $binDir +} +if (!(Test-Path -Path $binDir)) +{ + New-Item -ItemType Directory -Force -Path $binDir | Out-Null +}