Skip to content

Commit 4ba41c1

Browse files
committed
Update free-disk-space-windows.ps1
1 parent 77c5f45 commit 4ba41c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

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

1919
foreach ($dir in $dirs) {
20-
Start-ThreadJob { Remove-Item -Recurse -Force $dir }
20+
Start-ThreadJob { Remove-Item -Recurse -Force -LiteralPath $dir }
2121
}
2222

2323
foreach ($job in Get-Job) {
2424
Wait-Job $job > $null
2525
if ($job.Error) {
26-
Write-Output "::warning file=$PSCommandPath::$($job.Error)"
26+
$line = $job.Error.InvocationInfo.ScriptLineNumber
27+
Write-Output "::warning file=$PSCommandPath,line=$line::$($job.Error)"
2728
}
2829
Remove-Job $job
2930
}

0 commit comments

Comments
 (0)