You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Install-Module naming inconsistencies leads to import-module failures on Linux #470
module.nuspec -> "mymodulename" Take your module name and make it lower case in the id section of your nuspec
Make your manifest file MyModule.psd1 (note filename case sensitivity)
Inside your manifest, change the RootModule = 'MyModule.psm1' (note case sensitivity)
Make your PSM1 file MyModule.psm1 (note filename case sensitivity)
Build and Deploy with Azure Pipelines to Windows, OSX and Linux (Ubuntu)
Note the differences in file/folder creation and usability below based on platform. The only thing run has been install-module mymodule
Windows: Module folder named MyModule (note case). The PSM1 and PSD1 files are both MyModule (note the case).
import-module mymodule - Works
import-module MyModule - Works
OSX: module folder named mymodule (note the case). The PSM1 and PSD1 files are both 'mymodule' (note the case).
import-module mymodule - Works
import-module MyModule - Works
Ubuntu: module folder named mymodule (note the case). The PSM1 and PSD1 files are both named MyModule (note the upper case).
import-module mymodule - fails
import-module MyModule - fails
import-module /home/Me/.local/share/powershell/Modules/0.0.0.43/MyModule.psd1 - works
rename the module folder to match the case of the PSM and PSD files
import-module mymodule - Works
import-module MyModule - Works
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.2.0
PSEdition Core
GitCommitId 6.2.0
OS Linux 4.15.0-1041-azure #45-Ubuntu SMP Fri Mar 15 14:41:00 UTC 2019
Platform Unix
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
>Get-Module-ListAvailable PowerShellGet,PackageManagement
Directory: /opt/microsoft/powershell/6/Modules
ModuleType Version Name PSEdition ExportedCommands
----------------------------------------------
Script 1.3.1 PackageManagement Desk {Find-Package,Get-Package,Get-PackageProvider,Get-PackageSource…}
Script 2.1.2 PowerShellGet Desk {Find-Command,Find-DSCResource,Find-Module,Find-RoleCapability…}
Is your issue with Install-Module (mentioned in the title), which is part of PowerShellGet, or with Import-Module (as mentioned in the description) which is part of the PowerShell project - bug reports for that should be in the the PowerShell/PowerShell repository.
Whichever it is, I believe this comes down to the operating system's behavior - Windows and Mac are both case-insensitive but case-preserving, and Linux is case-sensitive. If we changed this, I think we could hit issues if you had a mymodule AND a MyModule directory - which would we pick? So I think it is unlikely that we will change this behavior.
On Tue, Apr 30, 2019 at 1:14 PM Edwin Young ***@***.***> wrote:
Sorry for the confusion.
Is your issue with Install-Module (mentioned in the title), which is part
of PowerShellGet, or with Import-Module (as mentioned in the description)
which is part of the PowerShell project - bug reports for that should be in
the the PowerShell/PowerShell repository.
Whichever it is, I believe this comes down to the operating system's
behavior - Windows and Mac are both case-insensitive but case-preserving,
and Linux is case-sensitive. If we changed this, I think we could hit
issues if you had a mymodule AND a MyModule directory - which would we
pick? So I think it is unlikely that we will change this behavior.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/PowerShell/PowerShellGet/issues/470#issuecomment-488098497>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABFBQT4UJNFUUZLKEMC5R7TPTCSB5ANCNFSM4HJPLDZQ>
.
Activity
edyoung commentedon Apr 30, 2019
Sorry for the confusion.
Is your issue with Install-Module (mentioned in the title), which is part of PowerShellGet, or with Import-Module (as mentioned in the description) which is part of the PowerShell project - bug reports for that should be in the the PowerShell/PowerShell repository.
Whichever it is, I believe this comes down to the operating system's behavior - Windows and Mac are both case-insensitive but case-preserving, and Linux is case-sensitive. If we changed this, I think we could hit issues if you had a mymodule AND a MyModule directory - which would we pick? So I think it is unlikely that we will change this behavior.
johnmccrae commentedon Apr 30, 2019