Sitelet https://github.com/JustinGrote/ModuleFast/issues/21
Skip to content

Get-ModuleFastPlan: Does not recognize preview versions are already available #21

Description

@johlju

When expected versions are already installed Get-ModuleFast normally does not return those as missing. But for preview versions it always returns them as missing even though they are in fact installed. Below shows the difference where two modules are installed and only the preview one is always listed as missing/needed.

PS> Get-Module -Name 'Plaster', 'WebAdministrationDsc' -ListAvailable | Format-Table Name, Version, @{Name='Prerelease'; Expression={$_.PrivateData.PSData.Prerelease}}

Name                 Version Prerelease
----                 ------- ----------
Plaster              1.1.4
WebAdministrationDsc 4.1.1   preview0001

PS> 'Plaster', 'WebAdministrationDsc@4.1.1-preview0001' | Get-ModuleFastPlan

Name                 ModuleVersion
----                 -------------
WebAdministrationDsc 4.1.1-preview0001

Activity

  1. JustinGrote commented on Dec 21, 2023

    @JustinGrote
    Owner

    Please try with Install-ModuleFast -WhatIf and see if it still occurs.

  2. JustinGrote commented on Dec 21, 2023

    @JustinGrote
    Owner

    Nevermind, there is a bug here. Note that -verbose and -debug have a lot of info.

    DEBUG: webadministrationdsc [4.1.1-preview0001, 4.1.1-preview0001]: Found satisfying version 4.1.1-preview0001 in the additional pages.
    VERBOSE: WebAdministrationDsc@4.1.1-preview0001: Added to install plan  
    

    If it found a satisfying version it shouldn't have been added to the plan. I'll investigate.

  3. self-assigned this
    on Dec 21, 2023
  4. JustinGrote commented on Dec 21, 2023

    @JustinGrote
    Owner

    Looks like the local match logic isn't working for prerelease, I might still have a basic version cast in there somewhere, or this step is just using the modulefolder version as a fast assumption and not checking the manifest for prerelease:
    DEBUG: webadministrationdsc: Found a module C:\Users\JGrote\AppData\Local\powershell\Modules\WebAdministrationDsc\4.1.1\WebAdministrationDsc.psd1 that matches the name but does not satisfy the version spec webadministrationdsc [4.1.1-preview0001, 4.1.1-preview0001]. Skipping...

  5. JustinGrote commented on Dec 22, 2023

    @JustinGrote
    Owner

    Should be fixed by #30

    And Test Covered by:

    It 'Doesnt install prerelease if same-version Prerelease already installed' {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions