Skip to content

Windows install fails when PSModulePath lists PowerShell 7 module paths first #75

Closed

Description

@Yivas

install fails on Windows when the build runs under Windows PowerShell 5.1 with a PSModulePath inherited from a PowerShell 7 process

PowerShell 7 prepends its own module paths for the child processes it starts, so 5.1 loads the Core-only Microsoft.PowerShell.Utility manifest from C:\Program Files\PowerShell\7\Modules and the script functions of the 5.1 module are not available, Get-FileHash among them

scripts/fetch-herdr-annotate.ps1:54 calls Get-FileHash with no fallback, so the checksum step throws and the install aborts
the windows-full variant has the same call in scripts/fetch-plannotator-tui.ps1:169, which I did not install

Get-FileHash : The term 'Get-FileHash' is not recognized as the name of a cmdlet...
Plugin was not installed.

to reproduce, start herdr from a pwsh 7 terminal and run herdr plugin install plannotator/herdr-annotate
running the same install with PSModulePath unset works

herdr-file-viewer handles the same case with a certutil -hashfile <file> SHA256 fallback in scripts/fetch-or-build.ps1
a fallback like that, or computing the hash with [System.Security.Cryptography.SHA256], keeps the install working in both environments

herdr 0.9.5, Windows 11, Windows PowerShell 5.1.26100, PowerShell 7.6.6

Activity

  1. backnotprop commented on Oct 23, 2026

    @backnotprop
    Contributor

    Thanks @Yivas, fixed in #77. Reinstall or update the plugin to pick it up.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions