Skip to content

🐛 Some classic paths not able to be processed correctly #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2024
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