Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions diagnostics/collect-wsl-logs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,15 @@ if ($Dump)
}
}

$logArchive = "$(Resolve-Path $folder).zip"
Compress-Archive -Path $folder -DestinationPath $logArchive
Remove-Item $folder -Recurse

Write-Host -ForegroundColor Green "Logs saved in: $logArchive. Please attach that file to the GitHub issue."
$logArchive = "$(Resolve-Path $folder).tar.gz"
tar.exe -czf $logArchive $folder
if ($LASTEXITCODE -eq 0)
{
Remove-Item $folder -Recurse
Write-Host -ForegroundColor Green "Logs saved in: $logArchive. Please attach that file to the GitHub issue."
}
else
{
Remove-Item $logArchive -ErrorAction Ignore
Write-Host -ForegroundColor Red "Failed to compress logs. They are available in: $(Resolve-Path $folder)"
}
Loading