From cc0ba79a66fe739a6e87b8ada5850007201916be Mon Sep 17 00:00:00 2001 From: James Truher Date: Tue, 26 Mar 2019 10:36:49 -0700 Subject: [PATCH] Change logic for copying profiles into the 'install' directory Multiple runs would result in incorrect layout of the compatibility profiles --- build.psm1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index 38b80d4a0..19e1906b2 100644 --- a/build.psm1 +++ b/build.psm1 @@ -119,8 +119,11 @@ function Copy-CompatibilityProfiles $profileDir = [System.IO.Path]::Combine($PSScriptRoot, 'PSCompatibilityAnalyzer', 'profiles') $destinationDir = [System.IO.Path]::Combine($PSScriptRoot, 'out', 'PSScriptAnalyzer', "compatibility_profiles") + if ( -not (Test-Path $destinationDir) ) { + $null = New-Item -Type Directory $destinationDir + } - Copy-Item -Recurse $profileDir $destinationDir + Copy-Item -Force $profileDir/* $destinationDir } # build script analyzer (and optionally build everything with -All)