Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Modules published with inconsistent case don't install on Linux #472

Open

Description

@edyoung

If you have a module with name ABC which is listed in the gallery as abc, you can Install it, but once installed Get-Module -ListAvailable and other commands won't find it, because the file is abc/ABC.psd1, which is not found. This showed up for ModuleRequireLicenseAcceptance which was moduleRequireLicenseAcceptance in poshtestgallery but not psgallery.

We should prevent publication of modules like this. See also #470

Activity

  1. iricigor commented on May 24, 2019

    @iricigor
    Contributor

    I added some my findings into duplicated issue #485, so I am copying them here.

    Steps to reproduce

    Install-Module FIFA2018
    Import-Module FIFA2018

    Expected behavior

    Module is imported into session. This is working fine on Windows machines (both Windows PowerShell or PowerShell Core). It is not working fine on Linux (error in next section).

    Actual behavior

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

    Check against PS Gallery

    About 4% of modules in PS Gallery would have similar problems. It is impacting even some high class modules like AzureRM.profile / AzureRM.Profile.

    image

  2. iricigor commented on May 24, 2019

    @iricigor
    Contributor

    Root cause for this behavior seems to be case-sensitive search in Linux.

    Module manifest should be saved in <ModuleName>/<Version>/<ModuleName>.psd1. However some modules have directory name and manifest name with different letter cases (i.e. moduleName vs ModuleName or modulename).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions