Give actual reason why module of specified version could not be installed when it was not found

未关闭
#1,752 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp, powershell
领域
cli, tooling

调研方向

首先,使用一个不存在的软件包版本重现 Install-PSResource 和 Save-PSResource 的情况,然后将它们的错误与 Find-PSResource 进行比较。跟踪这些入口点的命令实现和错误处理;完成的标准是两个命令都报告在指定的存储库中找不到所请求的软件包版本。

由索引模型根据 Issue 内容生成。

描述

Area-ErrorHandling Area-Install feature_request
Summary of the new feature / enhancement

Windows 11 24H2
PowerShell x64 v7.4.6
Microsoft.PowerShell.PSResourceGet v1.0.6

PS > Install-PSresource -Repository 'PSGallery' -TrustRepository -Scope 'CurrentUser' -Name 'Az.Accounts' -Version '99.98.97'

Install-PSResource: Package(s) 'Az.Accounts' could not be installed from repository 'PSGallery'.

PS >

It'd be great is PSResourceGet to output the actual reason for why Az.Accounts v99.98.97 could not be installed: That this version was not found in the given repository.

Find-PSResource returns this information, Save-PSResource and Install-PSResource should too.

PS > Find-PSResource -Repository 'PSGallery' -Name 'Az.Accounts' -Version '99.98.97'

Find-PSResource: Package with name 'Az.Accounts', version '99.98.97' could not be found in repository 'PSGallery'.

PS >
Proposed technical implementation details (optional)

No response

主要语言
C#
星标
581
派生
116
平均合并
1 天 21 小时
30 天内合并 PR
9

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PowerShell/PSResourceGet 的其他 Issue

查看 PowerShell/PSResourceGet 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。