Skip to content

馃[Bug]: not working on case sensitive filesystem#44

Description

Describe the bug

the module is called "JWT" (regardless of the case specified in Install-Module) but the psd1 and psm1 files have a different case (Jwt).

On systems with case sensitive filesystem this breaks the module loading.

Version information

Name Value


PSVersion 7.6.5
PSEdition Core
GitCommitId 7.6.5
OS Ubuntu 24.04.4 LTS
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

To reproduce

docker run -it mcr.microsoft.com/dotnet/sdk:8.0 pwsh

PS /> Install-Module -Force Jwt -Scope AllUsers -Verbose -ErrorAction Stop
[...]
VERBOSE: Module 'JWT' was installed successfully to path '/usr/local/share/powershell/Modules/JWT/2.0.0'.

PS /> ls -l /usr/local/share/powershell/Modules/JWT/2.0.0
total 112
-rw-r--r-- 1 root root 2074 Aug 3 03:18 Jwt.psd1
-rw-r--r-- 1 root root 91481 Aug 3 03:18 Jwt.psm1
-rw-r--r-- 1 root root 7120 Aug 27 08:48 PSGetModuleInfo.xml
drwxr-xr-x 2 root root 4096 Aug 27 08:48 formats
drwxr-xr-x 2 root root 4096 Aug 27 08:48 types

PS /> Import-Module Jwt
Import-Module: The specified module 'Jwt' was not loaded because no valid module file was found in any module directory.

hotfix

PS /> cp /usr/local/share/powershell/Modules/JWT/2.0.0/Jwt.psm1 /usr/local/share/powershell/Modules/JWT/2.0.0/JWT.psm1
PS /> cp /usr/local/share/powershell/Modules/JWT/2.0.0/Jwt.psd1 /usr/local/share/powershell/Modules/JWT/2.0.0/JWT.psd1
PS /> Import-Module Jwt # works

Code snippet

loading the module

Relevant output

PS /> Import-Module Jwt -Debug -Verbose
VERBOSE: Skipping the Version folder 2.0.0 under Module /usr/local/share/powershell/Modules/JWT as it does not have a valid module manifest file.
Import-Module: The specified module 'Jwt' was not loaded because no valid module file was found in any module directory.

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