Skip to content

Commit c16e3fc

Browse files
authored
Merge pull request #11 from KernelErr0r/fix/namespaced-images-tag-support
Add tag support for namespaced images
2 parents 261d474 + 2bf6610 commit c16e3fc

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

easyWSL/DistroInstaller.cs

+11-3
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,18 @@ void GetRequestWithHeaderToFile(string url, string token, string type, string fi
9595
if (distroImage.Contains('/'))
9696
{
9797
string[] imageArray = distroImage.Split('/');
98-
tag = "latest";
99-
repository = distroImage;
100-
}
10198

99+
if (imageArray[1].Contains(':'))
100+
{
101+
tag = imageArray[1].Split(':')[1];
102+
repository = distroImage.Split(':')[0];
103+
}
104+
else
105+
{
106+
tag = "latest";
107+
repository = distroImage;
108+
}
109+
}
102110
else
103111
{
104112
string[] imageArray = distroImage.Split(':');

0 commit comments

Comments
 (0)