Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#2,066 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C#
Star
578
Fork
114
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSResourceGet

Tất cả issue của PowerShell/PSResourceGet

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.