Skip to content

Commit

Permalink
Solves incompatibility with GUI disabled setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
okibcn committed Feb 16, 2023
1 parent 8378942 commit 4d0685a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WslCompact/WslCompact.psm1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WslCompact v8.0 2023.02.13
# WslCompact v8.5 2023.02.16
# (C) 2023 Oscar Lopez.
# For more information visit: https://github.com/okibcn/wslcompact
#
Expand All @@ -20,7 +20,7 @@ function WslCompact {
$arg
}
}
Write-Host " WslCompact v8.0 2023.02.13
Write-Host " WslCompact v8.5 2023.02.16
(C) 2023 Oscar Lopez
wslcompact -h for help. For more information visit: https://github.com/okibcn/wslcompact"

Expand Down Expand Up @@ -76,7 +76,7 @@ function WslCompact {
$estimated = [long]($size1)
}
else {
$estimated = ((wsl --system -d "$wsl_distro" -e df /mnt/wslg/distro) | Select-String -Pattern "(?<=^\/dev[^\s]+\s+\d+\s+)\d+" ).Matches[0].Value
$estimated = ((wsl -d "$wsl_distro" -e df /) | Select-String -Pattern "(?<=^\/dev[^\s]+\s+\d+\s+)\d+" ).Matches[0].Value
$estimated = [long]($estimated / 1024)
Write-Host " Estimated size: $([long]($estimated * ((($sf - 1) / 2) + 1))) +/- $([long]($estimated * ($sf - 1) / 2)) MB"
Write-Host " The estimated process time using an SSD is about $([math]::ceiling($estimated/4000)) minutes."
Expand Down

0 comments on commit 4d0685a

Please sign in to comment.