Skip to content

[0.9.0-rc1] Installed modules from GitHub Packages with upper case in name cannot be imported on Linux #1402

Description

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Install and import a module hosted on GitHub Packages that uses upper letters in the name:

Install-PSResource -Name 'lowercasemodule' # -Repository $packageSource.Name -Credential $cred -TrustRepository
Install-PSResource -Name 'PascalCaseModule' # -Repository $packageSource.Name -Credential $cred -TrustRepository

Import-Module 'lowercasemodule' -Force -Verbose
Import-Module 'PascalCaseModule' -Force -Verbose

Expected behavior

lowercasemodule and PascalCaseModule module are installed and imported.

Actual behavior

lowercasemodule module is installed and imported, while PascalCaseModule module is installed but fails to import.

Error details

--- lowercasemodule install starts here:
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Scripts'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Modules'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Scripts'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules/Microsoft.PowerShell.PSResourceGet'
VERBOSE: Attempting to search for packages in 'github/jtomkiew-mng'
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
VERBOSE: Installation source path is: '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c/lowercasemodule/1.0.0'
VERBOSE: Installation destination path is: '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0'
VERBOSE: Attempting to move '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c/lowercasemodule/1.0.0' to '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0'
VERBOSE: Successfully installed package 'lowercasemodule' to location '/home/runner/.local/share/powershell/Modules'
VERBOSE: Attempting to delete '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c'
VERBOSE: Successfully deleted '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c'

--- PascalCaseModule install starts here:
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Scripts'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Modules'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Scripts'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules/lowercasemodule'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules/Microsoft.PowerShell.PSResourceGet'
VERBOSE: Attempting to search for packages in 'github/jtomkiew-mng'
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
VERBOSE: This resource is not a PowerShell package and will be installed to the modules path: /home/runner/.local/share/powershell/Modules.
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
VERBOSE: Installation source path is: '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba/pascalcasemodule/1.0.0'
VERBOSE: Installation destination path is: '/home/runner/.local/share/powershell/Modules/pascalcasemodule/1.0.0'
VERBOSE: Attempting to move '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba/pascalcasemodule/1.0.0' to '/home/runner/.local/share/powershell/Modules/pascalcasemodule/1.0.0'
VERBOSE: Successfully installed package 'pascalcasemodule' to location '/home/runner/.local/share/powershell/Modules'
VERBOSE: Attempting to delete '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba'
VERBOSE: Successfully deleted '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba'

--- lowercasemodule import starts here:
VERBOSE: Loading module from path '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0/lowercasemodule.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module lowercasemodule.
VERBOSE: Loading module from path '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0/lowercasemodule.psm1'.
VERBOSE: Exporting function 'Show-Bread'.
VERBOSE: Importing function 'Show-Bread'.

--- PascalCaseModule import starts here:
VERBOSE: Skipping the Version folder 1.0.0 under Module /home/runner/.local/share/powershell/Modules/pascalcasemodule as it does not have a valid module manifest file.
Import-Module: /home/runner/work/_temp/0491fe94-aa68-41da-a922-6f403c0b1a7e.ps1:30
Line |
  30 |  Import-Module 'PascalCaseModule' -Force -Verbose
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The specified module 'PascalCaseModule' was not loaded because no valid
     | module file was found in any module directory.

Environment data

See workflow:
https://github.com/jtomkiew-mng/pwsh-example-module/actions/runs/6161850021/workflow

See NuGet packages:
https://github.com/jtomkiew-mng/pwsh-example-module/tree/main/.nuget

See package sources:
https://github.com/jtomkiew-mng/pwsh-example-module/tree/main/lowercasemodule
https://github.com/jtomkiew-mng/pwsh-example-module/tree/main/PascalCaseModule

Visuals

No response

Activity

  1. anamnavi commented on Sep 12, 2023

    @anamnavi
    Member

    Jakub Tomkiewicz (@jtomkiew-mng) thanks for sharing this! What distro of Linux are you using? What are the LANG and LC_ALL values?

  2. jtomkiew-mng commented on Sep 13, 2023

    @jtomkiew-mng
    Author

    This is the output of lsb_release and env vars LANG, LC_ALL from bash:

    Distributor ID:	Ubuntu
    Description:	Ubuntu 22.04.3 LTS
    Release:	22.04
    Codename:	jammy
    
    LANG: C.UTF-8
    LC_ALL: 
    

    I've been running this on GitHub ubuntu-latest runners so far.

  3. jtomkiew-mng commented on Sep 13, 2023

    @jtomkiew-mng
    Author

    In the logs when installing PascalCaseModule I've noticed this:

    VERBOSE: This resource is not a PowerShell package and will be installed to the modules path: /home/runner/.local/share/powershell/Modules.
    

    And the installed module PascalCaseModule contents contain a .nuspec file, while lowercasemodule does not (those 2 modules should be identical other than the name and GUID).

    If it helps I'm attaching installed-modules.zip - zipped both modules as they were installed on that host (contents of /home/runner/.local/share/powershell/Modules/ minus PSResourceGet module).

  4. adityapatwardhan commented on Sep 25, 2023

    @adityapatwardhan
    Member

    When the locale setting is C.UTF-8, it is meant to be case sensitive at the OS level. So, comparing a P and p will show them as a different character even with case insensitive comparison. I recommend using a locale without a C like en-US.UTF-8 or using the exact case as for the module names.

  5. jtomkiew-mng commented on Sep 26, 2023

    @jtomkiew-mng
    Author

    I see no difference, what I did now:

    1. created a fresh Ubuntu 22.04.3 LTS VM,
    2. changed default locale to en-US.UTF-8 as Aditya Patwardhan (@adityapatwardhan) suggested,
    3. rebooted,
    4. installed PowerShell Core,
    5. installed GitHub runner,
    6. ran the same workflow as before, same result:
    Distributor ID:	Ubuntu
    Description:	Ubuntu 22.04.3 LTS
    Release:	22.04
    Codename:	jammy
    
    LANG=en_US.UTF-8
    LANGUAGE=
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    

    Using all lower case during install or import makes no difference in this case.
    This is the latest workflow I've ran: https://github.com/jtomkiew-mng/pwsh-example-module/blob/6e88f68fbc37f5c1d6f603d62bec26ababde92be/.github/workflows/ci.yml

  6. SydneyhSmith commented on Sep 26, 2023

    @SydneyhSmith
    Collaborator

    Re-opening to investigate, thanks for testing and letting us know that it repros Jakub Tomkiewicz (@jtomkiew-mng)

  7. rickandersen-forte commented on Oct 16, 2023

    @rickandersen-forte

    (Should this issue be set back to Open?)

  8. jtomkiew-mng commented on Oct 23, 2023

    @jtomkiew-mng
    Author

    Boop, there's your feedback bot.
    This issue stands as visible by the related issue #1446. Feel free to merge it if need be (in any direction).

    Currently I'm using a crude workaround on version 1.0.0 of PSResourceGet, that boils down to renaming the installed module directory to match the original case before importing.

  9. cf-rdegregory commented on Jul 15, 2025

    @cf-rdegregory

    Hello,

    This is still an active issue almost 2 years later and is very crude & annoying to work around.

    Sydney Smith (@SydneyhSmith), can someone from the PowerShell team please take a look at this? :)

  10. ephos commented on Jun 9, 2026

    @ephos

    Sydney Smith (@SydneyhSmith) Anam Navied (@anamnavi) still looking for anything on this as it appears to be abandoned. There is a pending PR in a duplicate issue #1446 that gets most of the way there in terms of a fix. Is this still on the PowerShell Team's radar?

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

Metadata

Metadata

Type

No type

Projects

  • Status
    TODO

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions