Open jtomkiew-mng opened 1 year ago
@jtomkiew-mng thanks for sharing this! What distro of Linux are you using? What are the LANG and LC_ALL values?
This is the output of lsb_release
and env vars LANG
, LC_ALL
from bash:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
LANG: C.UTF-8
LC_ALL:
I've been running this on GitHub ubuntu-latest
runners so far.
In the logs when installing PascalCaseModule
I've noticed this:
VERBOSE: This resource is not a PowerShell package and will be installed to the modules path: /home/runner/.local/share/powershell/Modules.
And the installed module PascalCaseModule
contents contain a .nuspec
file, while lowercasemodule
does not (those 2 modules should be identical other than the name and GUID).
If it helps I'm attaching installed-modules.zip - zipped both modules as they were installed on that host (contents of /home/runner/.local/share/powershell/Modules/
minus PSResourceGet
module).
When the locale setting is C.UTF-8, it is meant to be case sensitive at the OS level. So, comparing a P
and p
will show them as a different character even with case insensitive comparison. I recommend using a locale without a C
like en-US.UTF-8
or using the exact case as for the module names.
I see no difference, what I did now:
en-US.UTF-8
as @adityapatwardhan suggested,
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
Using all lower case during install or import makes no difference in this case.
This is the latest workflow I've ran: https://github.com/jtomkiew-mng/pwsh-example-module/blob/6e88f68fbc37f5c1d6f603d62bec26ababde92be/.github/workflows/ci.yml
Re-opening to investigate, thanks for testing and letting us know that it repros @jtomkiew-mng
(Should this issue be set back to Open?)
Boop, there's your feedback bot. This issue stands as visible by the related issue #1446. Feel free to merge it if need be (in any direction).
Currently I'm using a crude workaround on version 1.0.0
of PSResourceGet, that boils down to renaming the installed module directory to match the original case before importing.
Prerequisites
Steps to reproduce
Install and import a module hosted on GitHub Packages that uses upper letters in the name:
Expected behavior
Actual behavior
Error details
Environment data
Visuals
No response