Skip to content

Commit

Permalink
Added snap
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Mar 11, 2024
1 parent ea4303f commit 0e0eed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upgrade.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ function runWSLUpdate {
if ($dist.ToLower() -eq "ubuntu") {
Write-Host "`nUpdating $dist..."
if (-not $suMode) {
$distPackageManagers = "eval 'apt update && apt full-upgrade -y && apt autoremove -y'"
$distPackageManagers = "eval 'apt update && apt full-upgrade -y && apt autoremove -y && snap refresh'"
Start-Process -NoNewWindow -Wait -FilePath wsl.exe -ArgumentList "--distribution ubuntu", "--user root", "-- $distPackageManagers"
} else {
$distPackageManagers = "eval 'sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y'"
$distPackageManagers = "eval 'sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo snap refresh'"
Start-Process -NoNewWindow -Wait -FilePath wsl.exe -ArgumentList "--distribution ubuntu", "-- $distPackageManagers"
}
continue
Expand Down

0 comments on commit 0e0eed7

Please sign in to comment.