Skip to content

Fix Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. …#1927

Merged
TravisEz13 merged 2 commits intoPowerShell:masterfrom
bmanikm:master
Aug 19, 2016
Merged

Fix Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. …#1927
TravisEz13 merged 2 commits intoPowerShell:masterfrom
bmanikm:master

Conversation

@bmanikm
Copy link
Contributor

@bmanikm bmanikm commented Aug 19, 2016

…Added workaround fix in PowerShellGet
Workarounds issues #1618

…Added workaround fix in PowerShellGet for issue #1618
@msftclas
Copy link

Hi @bmanikm, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

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') `
Copy link

@quoctruong quoctruong Aug 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the one on the right hand side be -lt '5.0.0' too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@daxian-dbw daxian-dbw added the Area-PowerShellGet specific to PowerShellGet module label Aug 19, 2016
@aarongustafson
Copy link

Please merge soon :-)

$TestFileCatalogResult = Microsoft.PowerShell.Security\Test-FileCatalog -Path $ModuleBasePath `
-CatalogFilePath $CatalogFilePath `
-FilesToSkip $script:PSGetItemInfoFileName,'*.cat' `
-FilesToSkip $script:PSGetItemInfoFileName,'*.cat','*.nupkg','*.nuspec' `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line part of the workaround? If not, maybe it should be in another commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lzybkr Removed the additional change related to exclusion of .nupkg and .nuspec files in Test-FileCatalog cmdlet usage.

@quoctruong
Copy link

LGTM

@raghushantha
Copy link
Member

:shipit:

@TravisEz13 TravisEz13 changed the title Fix for Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. … Aug 19, 2016
@TravisEz13 TravisEz13 merged commit d7b3124 into PowerShell:master Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-PowerShellGet specific to PowerShellGet module

8 participants