Skip to content

Commit 2e85394

Browse files
authored
[pack] Fix PowerShell worker runtime trimming (#5706)
1 parent a2d9bc4 commit 2e85394

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/build-extensions.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ function CleanOutput([string] $rootPath) {
104104

105105
$keepRuntimes = @('win', 'win-x86', 'win10-x86', 'win-x64', 'win10-x64')
106106
Write-Host " Removing all powershell runtimes except $keepRuntimes"
107-
Get-ChildItem "$rootPath\workers\powershell\runtimes" -Exclude $keepRuntimes -ErrorAction SilentlyContinue |
107+
Get-ChildItem "$rootPath\workers\powershell" -Directory -ErrorAction SilentlyContinue |
108+
ForEach-Object { Get-ChildItem "$($_.FullName)\runtimes" -Directory -Exclude $keepRuntimes } |
108109
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
109110

110111
Write-Host " Current size: $(GetFolderSizeInMb $rootPath) Mb"

0 commit comments

Comments
 (0)