Description
I prepared an extensive script using PSIni, and in order not to rewrite it, I decided to run PowerShell in Linux.
The module installation proceeded without errors, but it was not possible to use this add-on. After analysis, it turned out that the module was installed in a directory with a structure that did not allow the module to be loaded.
When I changed the structure and changed the name of the directory where the module is located (case sensitive in Unix), it was correctly recognised.
Steps To Reproduce
- Start Powershell as a user
pwsh
- Install PIini module
Install-Module PSIni
- List the tree structure
tree -L 3 -N ~/.local/share/powershell
- Received
├── Modules
│ └── PsIni
│ └── 4.0.0
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── PSGetModuleInfo.xml
│ ├── PSIni.psd1
│ ├── PSIni.psm1
│ └── README.md
Expected behaviours
With the structure as below, the module is recognised correctly.
├── Modules
│ └── PSIni
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── PSGetModuleInfo.xml
│ ├── PSIni.psd1
│ ├── PSIni.psm1
│ └── README.md
Your Environment
System: Zorin OS - based on Ubuntu 22.04
Powershell: 7.5.1
Get-Module PSIni -ListAvailable | Select Name, Version
Name Version
---- -------
PSIni 4.0.0
$PSVersionTable
Name Value
---- -----
PSVersion 7.5.1
PSEdition Core
GitCommitId 7.5.1
OS Zorin OS 17.3
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Possible Solution
Be consistent in naming directories and files concerning case. In UNIX, this matters, but in Windows, it doesn't bother.
If possible, adjust the module's installation path.
Description
I prepared an extensive script using PSIni, and in order not to rewrite it, I decided to run PowerShell in Linux.
The module installation proceeded without errors, but it was not possible to use this add-on. After analysis, it turned out that the module was installed in a directory with a structure that did not allow the module to be loaded.
When I changed the structure and changed the name of the directory where the module is located (case sensitive in Unix), it was correctly recognised.
Steps To Reproduce
pwshInstall-Module PSInitree -L 3 -N ~/.local/share/powershellExpected behaviours
With the structure as below, the module is recognised correctly.
Your Environment
System: Zorin OS - based on Ubuntu 22.04
Powershell: 7.5.1
Possible Solution
Be consistent in naming directories and files concerning case. In UNIX, this matters, but in Windows, it doesn't bother.
If possible, adjust the module's installation path.