PowerShell / PowerShell/PSResourceGet

[0.9.0-rc1] Installed modules from GitHub Packages with upper case in name cannot be imported on Linux

Aperta
#1,402 10 commenti 6 reazioni 1 assegnatario Vedi su GitHub

@anamnavi ci sta già lavorando.

Dal 12/9/2023.

Area-Install Issue-Bug Needs-Attention :wave:
Lingua principale
C#
Stelle
576
Fork
114
Merge medio
1g 2h
PR unite (30g)
7

Descrizione

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.
Steps to reproduce

Install and import a module hosted on GitHub Packages that uses upper letters in the name:

Install-PSResource -Name 'lowercasemodule' # -Repository $packageSource.Name -Credential $cred -TrustRepository
Install-PSResource -Name 'PascalCaseModule' # -Repository $packageSource.Name -Credential $cred -TrustRepository

Import-Module 'lowercasemodule' -Force -Verbose
Import-Module 'PascalCaseModule' -Force -Verbose
Expected behavior
lowercasemodule and PascalCaseModule module are installed and imported.
Actual behavior
lowercasemodule module is installed and imported, while PascalCaseModule module is installed but fails to import.
Error details
--- lowercasemodule install starts here:
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Scripts'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Modules'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Scripts'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules/Microsoft.PowerShell.PSResourceGet'
VERBOSE: Attempting to search for packages in 'github/jtomkiew-mng'
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
VERBOSE: Installation source path is: '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c/lowercasemodule/1.0.0'
VERBOSE: Installation destination path is: '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0'
VERBOSE: Attempting to move '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c/lowercasemodule/1.0.0' to '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0'
VERBOSE: Successfully installed package 'lowercasemodule' to location '/home/runner/.local/share/powershell/Modules'
VERBOSE: Attempting to delete '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c'
VERBOSE: Successfully deleted '/tmp/454ce253-7bfd-49f0-a0fb-beb0939a336c'

--- PascalCaseModule install starts here:
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Scripts'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Modules'
VERBOSE: Retrieving directories in the path '/home/runner/.local/share/powershell/Scripts'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules/lowercasemodule'
VERBOSE: All paths to search: '/home/runner/.local/share/powershell/Modules/Microsoft.PowerShell.PSResourceGet'
VERBOSE: Attempting to search for packages in 'github/jtomkiew-mng'
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
VERBOSE: This resource is not a PowerShell package and will be installed to the modules path: /home/runner/.local/share/powershell/Modules.
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
VERBOSE: Installation source path is: '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba/pascalcasemodule/1.0.0'
VERBOSE: Installation destination path is: '/home/runner/.local/share/powershell/Modules/pascalcasemodule/1.0.0'
VERBOSE: Attempting to move '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba/pascalcasemodule/1.0.0' to '/home/runner/.local/share/powershell/Modules/pascalcasemodule/1.0.0'
VERBOSE: Successfully installed package 'pascalcasemodule' to location '/home/runner/.local/share/powershell/Modules'
VERBOSE: Attempting to delete '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba'
VERBOSE: Successfully deleted '/tmp/08f9852c-dbf5-46e7-bf5f-c1fe153822ba'

--- lowercasemodule import starts here:
VERBOSE: Loading module from path '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0/lowercasemodule.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module lowercasemodule.
VERBOSE: Loading module from path '/home/runner/.local/share/powershell/Modules/lowercasemodule/1.0.0/lowercasemodule.psm1'.
VERBOSE: Exporting function 'Show-Bread'.
VERBOSE: Importing function 'Show-Bread'.

--- PascalCaseModule import starts here:
VERBOSE: Skipping the Version folder 1.0.0 under Module /home/runner/.local/share/powershell/Modules/pascalcasemodule as it does not have a valid module manifest file.
Import-Module: /home/runner/work/_temp/0491fe94-aa68-41da-a922-6f403c0b1a7e.ps1:30
Line |
  30 |  Import-Module 'PascalCaseModule' -Force -Verbose
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The specified module 'PascalCaseModule' was not loaded because no valid
     | module file was found in any module directory.
Environment data
See workflow:
https://github.com/jtomkiew-mng/pwsh-example-module/actions/runs/6161850021/workflow

See NuGet packages:
https://github.com/jtomkiew-mng/pwsh-example-module/tree/main/.nuget

See package sources:
https://github.com/jtomkiew-mng/pwsh-example-module/tree/main/lowercasemodule
https://github.com/jtomkiew-mng/pwsh-example-module/tree/main/PascalCaseModule
Visuals

No response

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.