Skip to content

Commit 0c4d269

Browse files
authored
Fixes for Ubuntu DW (#8)
1 parent 0fdf4ea commit 0c4d269

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

WSLTools/Public/WSL-Ubuntu-Install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function WSL-Ubuntu-Install
6363
$versions = $versions.getElementsByTagName("a")
6464
$parsed_versions = $versions | Where-Object {$_.$prop -eq "cloud-images/+oci/ubuntu-base/tag/" -And $_.$search -match '.*(i386)|(amd64).*'}
6565

66-
$parsed_versions = $parsed_versions | % {Write-Output $($_.$search | Select-String -Pattern 'dist\-\w+\-(i386|amd64)-\d+' )} | % { $_.Matches } | % { $_.Value }
66+
$parsed_versions = $parsed_versions | % {Write-Output $($_.$search | Select-String -Pattern 'dist\-\w+\-(i386|amd64)-\d+.*' )} | % { $_.Matches } | % { $_.Value }
6767

6868
}
6969
Until ($parsed_versions.Count -gt 0)
@@ -84,7 +84,7 @@ function WSL-Ubuntu-Install
8484
# Trusty and Xenial have no OCI images
8585
if ($selected -match '.*(trusty)|(xenial).*') {
8686
$ihtml, $blobs = Invoke-WebParseable -Uri https://git.launchpad.net/cloud-images/+oci/ubuntu-base/tree/$selected
87-
$blob = $blobs.getElementsByTagName("a") | Where-Object {$_.href -match '.*plain.*\.tar\.gz.*'}
87+
$blob = $blobs.getElementsByTagName("a") | Where-Object {$_.$href -match '.*plain.*\.tar\.gz.*'}
8888
}
8989
if (-not ($selected -match '.*(trusty)|(xenial).*')) {
9090
$ihtml, $blobs = Invoke-WebParseable -Uri https://git.launchpad.net/cloud-images/+oci/ubuntu-base/tree/oci/blobs/sha256$selected
@@ -112,4 +112,4 @@ function WSL-Ubuntu-Install
112112
wsl -d $DistroAlias -u root -e sh -c 'apt-get update && apt-get upgrade -y'
113113

114114
return $true
115-
}
115+
}

0 commit comments

Comments
 (0)