PowerShellGetv2
PowerShellGetv2 copied to clipboard
Modules published with inconsistent case don't install on Linux
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
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.

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).