Skip to content
Merged
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
6 changes: 3 additions & 3 deletions ModuleFast.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,7 @@ function Find-LocalModule {
$manifestPath = Join-Path $moduleFolder $manifestName

if (Test-Path $ModuleFolder) {
$candidatePaths.Add([Tuple]::Create($moduleVersion, $manifestPath))
$candidatePaths.Add([Tuple]::Create([version]$moduleVersion, $manifestPath))
}
} else {
#Check for versioned module folders next and sort by the folder versions to process them in descending order.
Expand Down Expand Up @@ -1807,7 +1807,7 @@ function Find-LocalModule {
}
}

$candidatePaths.Add([Tuple]::Create($version, $PSItem))
$candidatePaths.Add([Tuple]::Create([Version]$version, $PSItem))
}
}

Expand All @@ -1820,7 +1820,7 @@ function Find-LocalModule {
#NOTE: This does result in Import-PowerShellData getting called twice which isn't ideal for performance, but classic modules should be fairly rare and not worth optimizing.
[version]$classicVersion = (Import-ModuleManifest $classicManifestPath).ModuleVersion
Write-Debug "${ModuleSpec}: Found classic module $classicVersion at $moduleBaseDir"
$candidatePaths.Add([Tuple]::Create($classicVersion, $moduleBaseDir))
$candidatePaths.Add([Tuple[Version, String]]::new($classicVersion, $moduleBaseDir))
}
}

Expand Down