Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Set-PSResourcerepository fails on new installation of PS-Core 7.6.7

Ouverte
#2,066 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
52/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
csharp
Domaine
tooling

Piste de recherche

The failure is in loading the repository store: the error reports 'Could not find a part of the path' for PSResourceRepository.xml under the user's application data folder on a fresh install. Start from where the store path is built and read, and check whether its parent directory is created before the file is accessed. Reproduce with a clean profile running Set-PSResourceRepository -PSGallery -trusted. Done when that command succeeds on a machine with no existing store, and the related issue #1965 is checked for overlap.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Needs-Triage
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

This is close to the issue #1965.

On a new install of pwsh on Windows and macOS this Command:
Set-PSResourceRepository -PSGallery -trusted
fails

Expected behavior
PS> Set-PSResourceRepository -PSGallery -trusted
Actual behavior
PS> Set-PSResourceRepository -PSGallery -trusted

`Set-PSResourceRepository: Cannot retrieve the dynamic parameters for the cmdlet. Loading repository store failed: Could not find a part of the path '/Users/username/Library/Application Support/PSResourceget/PSResourceRepository.xml'`
Error details

Environment data
PSVersion: 7.6.7
PSEdition: Core
GitCommitId: 767
OS: Microsoft Windows 10.0.26200
Platform: Win32NT
PSCompatibleVersions: {1.0, 2.0, 3.0, 4.0, ...}
PSRemotingProtocolVersion: 2.4
SerializationVersion: 1.1.0.1
WSManStackVersion: 3.0
Visuals

No response

Langage dominant
C#
Étoiles
578
Forks
114
Merge moyen
1 j 3 h
PR mergées (30 j)
5

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PowerShell/PSResourceGet

Toutes les issues de PowerShell/PSResourceGet

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.