Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/code/PSResourceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ public static bool TryConvertFromContainerRegistryJson(
metadata["Dependencies"] = ParseContainerRegistryDependencies(requiredModulesElement, out errorMsg).ToArray();
}

if (string.Equals(packageName, "Az", StringComparison.OrdinalIgnoreCase) || packageName.StartsWith("Az.", StringComparison.OrdinalIgnoreCase))
if (string.Equals(packageName, "Az", StringComparison.OrdinalIgnoreCase) || string.Equals(packageName, "Azpreview", StringComparison.OrdinalIgnoreCase) || packageName.StartsWith("Az.", StringComparison.OrdinalIgnoreCase))
{
if (rootDom.TryGetProperty("ModuleList", out JsonElement moduleListDepsElement))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,9 @@ Describe 'Test Find-PSResource for MAR Repository' -tags 'CI' {
$res.Dependencies.Length | Should -Be 1
$res.Dependencies[0].Name | Should -Be "Az.Accounts"
}

It "Should find Azpreview resource and it's dependency given specific Name and Version" {
$res = Find-PSResource -Name "Az.Storage" -Version "13.2.0" -Repository "MAR"
$res.Dependencies.Length | Should -Not -Be 0
}
}