Skip to content

Commit d374431

Browse files
committed
Strip .git extension from scoop source URLs
Fixes #3367 Will be rendered redundant and should be reverted if ScoopInstaller/Scoop#6297 is addressed directly by Scoop.
1 parent 2ccdd5b commit d374431

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/UniGetUI.PackageEngine.Managers.Scoop/Helpers/ScoopSourceHelper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ protected override IReadOnlyList<IManagerSource> GetSources_UnSafe()
8181
elements[1] = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
8282
"scoop", "buckets", elements[0].Trim());
8383
}
84+
else
85+
{
86+
elements[1] = Regex.Replace(elements[1], @"^(.*)\.git$", "$1");
87+
}
8488

8589
sources.Add(new ManagerSource(Manager, elements[0].Trim(), new Uri(elements[1]), int.Parse(elements[4].Trim()), elements[2].Trim() + " " + elements[3].Trim()));
8690
}

0 commit comments

Comments
 (0)