Skip to content

Commit 6e7a965

Browse files
committed
Update free-disk-space-windows.ps1
1 parent a79abf9 commit 6e7a965

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ci/scripts/free-disk-space-windows.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ $dirs = 'Does not exit',
1717
'C:\does not exist', 'oh no'
1818

1919
foreach ($dir in $dirs) {
20-
Start-ThreadJob -InputObject $dir -ScriptBlock { Remove-Item -Recurse -Force -LiteralPath $input }
20+
Start-ThreadJob -InputObject $dir {
21+
Remove-Item -Recurse -Force -LiteralPath $input
22+
} | Out-Null
2123
}
2224

2325
foreach ($job in Get-Job) {
24-
Wait-Job $job > $null
26+
Wait-Job $job | Out-Null
2527
if ($job.Error) {
26-
$line = $job.Error.InvocationInfo.ScriptLineNumber
27-
Write-Output "::warning file=$PSCommandPath,line=$line::$($job.Error)"
28+
Write-Output "::warning file=$PSCommandPath::$($job.Error)"
2829
}
2930
Remove-Job $job
3031
}

0 commit comments

Comments
 (0)