Skip to content

Commit

Permalink
Fix bug with only one distro in powershell script (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
mystery-e204 committed Jul 16, 2020
1 parent 61404b1 commit 70c543e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions move-wsl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Get-Distros()

# get and make sure there are distros
Write-Host 'Getting distros...';
$distroList = Get-Distros;
$distroList = @(Get-Distros);
if ($distroList.Length -le 0)
{
Write-Error 'No distro found';
Expand Down Expand Up @@ -86,7 +86,7 @@ Write-Host "Importing $distro from $targetFolder..."
& cmd /c wsl --import $distro $targetFolder "`"$tempFile`"";

# Validating
$newDistroList = Get-Distros;
$newDistroList = @(Get-Distros);
if ($newDistroList -notcontains $distro)
{
Write-Error "Import failed. Distro not found. Export file at $tempFile";
Expand Down

0 comments on commit 70c543e

Please sign in to comment.