Skip to content
Merged
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 ModuleFast.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,7 @@ function Read-RequiredSpecFile ($RequiredSpecPath) {
}

filter Resolve-FolderVersion([NuGetVersion]$version) {
if ($version.IsLegacyVersion) {
if ($version.IsLegacyVersion -or $version.OriginalVersion -match '\d+\.\d+\.\d+\.\d+') {
return $version.version
}
[Version]::new($version.Major, $version.Minor, $version.Patch)
Expand Down
10 changes: 9 additions & 1 deletion ModuleFast.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ Describe 'Install-ModuleFast' -Tag 'E2E' {
Get-Item $installTempPath\Az.Accounts\*\Az.Accounts.psd1 | Should -Not -BeNullOrEmpty
}
It '4 section version numbers (VMware.PowerCLI)' {
Install-ModuleFast @imfParams 'VMware.VimAutomation.Common=13.2.0.22643733'
$actual = Install-ModuleFast @imfParams 'VMware.VimAutomation.Common=13.2.0.22643733' -PassThru
Get-Item $installTempPath\VMware*\*\*.psd1 | ForEach-Object {
$moduleFolderVersion = $_ | Split-Path | Split-Path -Leaf
Import-PowerShellDataFile -Path $_.FullName | Select-Object -ExpandProperty ModuleVersion | Should -Be $moduleFolderVersion
Expand All @@ -438,6 +438,14 @@ Describe 'Install-ModuleFast' -Tag 'E2E' {
| Limit-ModulePath $installTempPath
| Should -HaveCount 2
}
It '4 section version numbers with repeated zeroes' {
$actual = Install-ModuleFast @imfParams 'xDSCResourceDesigner=1.13.0.0' -PassThru
$resolvedPath = Resolve-Path $actual.Location.LocalPath
Split-Path $resolvedPath -Leaf | Should -Be '1.13.0.0'
Get-Module xDSCResourceDesigner -ListAvailable
| Limit-ModulePath $installTempPath
| Should -HaveCount 1
}
It 'lots of dependencies (Az)' {
Install-ModuleFast @imfParams 'Az'
(Get-Module Az* -ListAvailable).count | Should -BeGreaterThan 10
Expand Down