Skip to content

Commit

Permalink
Merge pull request #11 from KernelErr0r/fix/namespaced-images-tag-sup…
Browse files Browse the repository at this point in the history
…port

Add tag support for namespaced images
  • Loading branch information
unrooted authored Aug 18, 2021
2 parents 261d474 + 2bf6610 commit c16e3fc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions easyWSL/DistroInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,18 @@ void GetRequestWithHeaderToFile(string url, string token, string type, string fi
if (distroImage.Contains('/'))
{
string[] imageArray = distroImage.Split('/');
tag = "latest";
repository = distroImage;
}

if (imageArray[1].Contains(':'))
{
tag = imageArray[1].Split(':')[1];
repository = distroImage.Split(':')[0];
}
else
{
tag = "latest";
repository = distroImage;
}
}
else
{
string[] imageArray = distroImage.Split(':');
Expand Down

0 comments on commit c16e3fc

Please sign in to comment.