Skip to content

Commit 7eb5d14

Browse files
committed
Fix scoop source parsing issues (fix #3445)
1 parent a7af35f commit 7eb5d14

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,16 @@ protected override IReadOnlyList<IManagerSource> GetSources_UnSafe()
8686
elements[1] = Regex.Replace(elements[1], @"^(.*)\.git$", "$1");
8787
}
8888

89-
sources.Add(new ManagerSource(Manager, elements[0].Trim(), new Uri(elements[1]), int.Parse(elements[4].Trim()), elements[2].Trim() + " " + elements[3].Trim()));
89+
try
90+
{
91+
sources.Add(new ManagerSource(Manager, elements[0].Trim(), new Uri(elements[1]),
92+
int.Parse(elements[4].Trim()), elements[2].Trim() + " " + elements[3].Trim()));
93+
}
94+
catch (Exception ex)
95+
{
96+
logger.AddToStdErr(ex.ToString());
97+
sources.Add(new ManagerSource(Manager, elements[0].Trim(), new Uri(elements[1]), -1, "1/1/1970"));
98+
}
9099
}
91100
}
92101
}

0 commit comments

Comments
 (0)