Skip to content

Unix folder structure and naming #127

@tytan15

Description

@tytan15

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

  1. Start Powershell as a user
    pwsh
  2. Install PIini module
    Install-Module PSIni
  3. List the tree structure
    tree -L 3 -N ~/.local/share/powershell
  4. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions