Skip to content

Commit e6ad7ff

Browse files
committed
Found the bug, a typo
1 parent ea945d2 commit e6ad7ff

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/code/PSResourceInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,10 +1639,10 @@ internal static Dependency[] ParseHttpDependencies(string dependencyString)
16391639
internal static List<Dependency> ParseContainerRegistryDependencies(JsonElement requiredModulesElement, out string errorMsg)
16401640
{
16411641
errorMsg = string.Empty;
1642-
List<Dependency> pkgDeps = new List<Dependency>();
1642+
List<Dependency> pkgDeps = new();
16431643
if (requiredModulesElement.ValueKind == JsonValueKind.Array)
16441644
{
1645-
foreach (var dependency in requiredModulesElement.EnumerateArray())
1645+
foreach (JsonElement dependency in requiredModulesElement.EnumerateArray())
16461646
{
16471647
if (dependency.ValueKind == JsonValueKind.String)
16481648
{
@@ -1677,7 +1677,7 @@ internal static List<Dependency> ParseContainerRegistryDependencies(JsonElement
16771677
// New-ScriptFileInfo will add "RequiredVersion" value as "null" if nothing is explicitly passed in,
16781678
// Which gets translated to an empty string.
16791679
// In this case, we just want the VersionRange to be VersionRange.All
1680-
if (!string.Equals(depModuleVersionElement.ToString(), string.Empty))
1680+
if (!string.Equals(depRequiredVersionElement.ToString(), string.Empty))
16811681
{
16821682
if (!NuGetVersion.TryParse(depRequiredVersionElement.ToString(), out NuGetVersion depNuGetVersion))
16831683
{

0 commit comments

Comments
 (0)