Skip to content

Commit

Permalink
ACR: Parse 'ModuleList' from ACR server metadata to populate 'Depende…
Browse files Browse the repository at this point in the history
…ncies' in PSResourceInfo object (PowerShell#1604)
  • Loading branch information
alerickson authored Mar 18, 2024
1 parent 8730b58 commit ee88277
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/code/PSResourceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,16 @@ public static bool TryConvertFromContainerRegistryJson(
{
metadata["Dependencies"] = ParseContainerRegistryDependencies(requiredModulesElement, out errorMsg).ToArray();
}
if (string.Equals(packageName, "Az", StringComparison.OrdinalIgnoreCase) || packageName.StartsWith("Az.", StringComparison.OrdinalIgnoreCase))
{
if (rootDom.TryGetProperty("PrivateData", out JsonElement privateDataElement) && privateDataElement.TryGetProperty("PSData", out JsonElement psDataElement))
{
if (psDataElement.TryGetProperty("ModuleList", out JsonElement moduleListDepsElement))
{
metadata["Dependencies"] = ParseContainerRegistryDependencies(moduleListDepsElement, out errorMsg).ToArray();
}
}
}

var additionalMetadataHashtable = new Dictionary<string, string>
{
Expand Down

0 comments on commit ee88277

Please sign in to comment.