Update GetDependencyInfo.cs
This commit is contained in:
parent
8fa51f49e8
commit
1dc073731d
1 changed files with 14 additions and 14 deletions
|
@ -33,10 +33,9 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
try
|
||||
{
|
||||
using Stream file = new HttpClient().GetStreamAsync(
|
||||
$"https://raw.githubusercontent.com/dotnet/installer/{DotnetInstallerCommit}/eng/Version.Details.xml")
|
||||
.Result;
|
||||
|
||||
string versionsXmlUrl = $"https://raw.githubusercontent.com/dotnet/installer/{DotnetInstallerCommit}/eng/Version.Details.xml";
|
||||
using (Stream file = new HttpClient().GetStreamAsync(versionsXmlUrl).Result)
|
||||
{
|
||||
XDocument document = XDocument.Load(file);
|
||||
XElement dependency = document
|
||||
.Element("Dependencies")?
|
||||
|
@ -50,6 +49,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
DependencyCommit = dependency.Element("Sha")?.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.LogWarning($"GetComponentCommit failed for DotnetInstallerCommit={DotnetInstallerCommit}, DependencyName={DependencyName}: {ex}");
|
||||
|
|
Loading…
Add table
Reference in a new issue