Fix Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. …#1927
Fix Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. …#1927TravisEz13 merged 2 commits intoPowerShell:masterfrom bmanikm:master
Conversation
…Added workaround fix in PowerShellGet for issue #1618
|
Hi @bmanikm, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
|
|
||
| if (($PSVersionTable.PSVersion -lt [Version]"5.0") -or ($PowerShellVersion -and $PowerShellVersion -lt [Version]"5.0") ` | ||
| -or (-not $PowerShellVersion -and $moduleInfo.PowerShellVersion -and $moduleInfo.PowerShellVersion -lt [Version]"5.0") ` | ||
| if (($PSVersionTable.PSVersion -lt '5.0.0') -or ($PowerShellVersion -and $PowerShellVersion -lt '5.0') ` |
There was a problem hiding this comment.
Should the one on the right hand side be -lt '5.0.0' too?
There was a problem hiding this comment.
@quoctruong, not required for now, $PowerShellVersion is still of Version type and not SemanticVersion. We will have to make lot of changes to support SemanticVersion type in the module infrastructure.
|
Please merge soon :-) |
| $TestFileCatalogResult = Microsoft.PowerShell.Security\Test-FileCatalog -Path $ModuleBasePath ` | ||
| -CatalogFilePath $CatalogFilePath ` | ||
| -FilesToSkip $script:PSGetItemInfoFileName,'*.cat' ` | ||
| -FilesToSkip $script:PSGetItemInfoFileName,'*.cat','*.nupkg','*.nuspec' ` |
There was a problem hiding this comment.
Is this line part of the workaround? If not, maybe it should be in another commit.
There was a problem hiding this comment.
@lzybkr Removed the additional change related to exclusion of .nupkg and .nuspec files in Test-FileCatalog cmdlet usage.
…pec files in Test-FileCatalog cmdlet usage
|
LGTM |
|
|
…Added workaround fix in PowerShellGet
Workarounds issues #1618