Skip to content

Commit cc75c62

Browse files
JamesWTruherbergmeister
authored andcommitted
Change logic for copying profiles into the 'install' directory (#1197)
Multiple runs would result in incorrect layout of the compatibility profiles
1 parent 23a18f6 commit cc75c62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build.psm1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,11 @@ function Copy-CompatibilityProfiles
119119

120120
$profileDir = [System.IO.Path]::Combine($PSScriptRoot, 'PSCompatibilityAnalyzer', 'profiles')
121121
$destinationDir = [System.IO.Path]::Combine($PSScriptRoot, 'out', 'PSScriptAnalyzer', "compatibility_profiles")
122+
if ( -not (Test-Path $destinationDir) ) {
123+
$null = New-Item -Type Directory $destinationDir
124+
}
122125

123-
Copy-Item -Recurse $profileDir $destinationDir
126+
Copy-Item -Force $profileDir/* $destinationDir
124127
}
125128

126129
# build script analyzer (and optionally build everything with -All)

0 commit comments

Comments
 (0)