Skip to content
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
edyoung opened this issue May 1, 2019 · 2 comments
Open

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

edyoung opened this issue May 1, 2019 · 2 comments
Labels

Comments

@edyoung
Copy link
Contributor

edyoung commented May 1, 2019

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

@iricigor
Copy link
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

@iricigor
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants