Skip to content

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

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
bmanikm:master
Aug 19, 2016
Merged

Fix Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. …#1927
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
bmanikm:master

Conversation

@bmanikm

@bmanikm Manikyam Bavandla (bmanikm) commented Aug 19, 2016

Copy link
Copy Markdown
Contributor

…Added workaround fix in PowerShellGet
Workarounds issues #1618

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

Hi Manikyam Bavandla (@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') `

@quoctruong Quoc Truong (quoctruong) Aug 19, 2016

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Quoc Truong (@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 Dongbo Wang (daxian-dbw) added the Area-PowerShellGet specific to PowerShellGet module label Aug 19, 2016
@aarongustafson

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

@quoctruong

Copy link
Copy Markdown

LGTM

@raghushantha

Copy link
Copy Markdown
Member

:shipit:

@TravisEz13 Travis Plunk (TravisEz13) changed the title Fix for Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. … Fix Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. … Aug 19, 2016
@TravisEz13
Travis Plunk (TravisEz13) merged commit d7b3124 into PowerShell:master Aug 19, 2016
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
…owerShell#1927)

* Fix for Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. Added workaround fix in PowerShellGet for issue PowerShell#1618

* removed the additional change related to exclusion of .nupkg and .nuspec files in Test-FileCatalog cmdlet usage
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants