Find-PSResource stops searching, when one of registered repositories is not available.
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
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
When there are several repositories registered and one of them is currently not available (for example private repository when machine is out of office), then Find-PSResource stops with terminating error and refuses to search from available repositories.
Expected behavior
PS ❯ Find-PSResource sqlserver
Name Version Prerelease Repository Description
---- ------- ---------- ---------- -----------
SqlServer 22.4.5.1 PSGallery This module allows SQL Server developers, administrators and business intelligence professionals to au…
Actual behavior
PS ❯ Find-PSResource sqlserver -ErrorAction Ignore
Find-PSResource: The network path was not found. : '\\server\share\folder'.
Error details
Exception :
Type : System.IO.IOException
TargetSite :
Name : Init
DeclaringType : [System.IO.Enumeration.FileSystemEnumerator`1[TResult]]
MemberType : Method
Module : System.Private.CoreLib.dll
Message : The network path was not found. : '\\server\share\folder'.
Source : System.Private.CoreLib
HResult : -2147024843
StackTrace :
at System.IO.Enumeration.FileSystemEnumerator`1.Init()
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
at Microsoft.PowerShell.PSResourceGet.Cmdlets.LocalServerAPICalls.FindNameHelper(String packageName, String[] tags, Boolean includePrerelease
, ResourceType type, ErrorRecord& errRecord) in C:\__w\1\s\PSResourceGet\src\code\LocalServerApiCalls.cs:line 266
at Microsoft.PowerShell.PSResourceGet.Cmdlets.LocalServerAPICalls.FindName(String packageName, Boolean includePrerelease, ResourceType type,
ErrorRecord& errRecord) in C:\__w\1\s\PSResourceGet\src\code\LocalServerApiCalls.cs:line 109
at Microsoft.PowerShell.PSResourceGet.Cmdlets.FindHelper.SearchByNames(ServerApiCall currentServer, ResponseUtil currentResponseUtil, PSRepos
itoryInfo repository, Boolean shouldReportErrorForEachRepo)+MoveNext() in C:\__w\1\s\PSResourceGet\src\code\FindHelper.cs:line 792
at Microsoft.PowerShell.PSResourceGet.Cmdlets.FindHelper.FindByResourceName(String[] name, ResourceType type, VersionRange versionRange, NuGe
tVersion nugetVersion, VersionType versionType, String version, Boolean prerelease, String[] tag, String[] repository, Boolean includeDependenci
es, Boolean suppressErrors)+MoveNext() in C:\__w\1\s\PSResourceGet\src\code\FindHelper.cs:line 223
at Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource.ProcessResourceNameParameterSet() in C:\__w\1\s\PSResourceGet\src\code\FindPSRes
ource.cs:line 249
at Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource.ProcessRecord() in C:\__w\1\s\PSResourceGet\src\code\FindPSResource.cs:line 148
at System.Management.Automation.CommandProcessor.ProcessRecord()
CategoryInfo : NotSpecified: (:) [Find-PSResource], IOException
FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource
InvocationInfo :
MyCommand : Find-PSResource
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 13
Line : find-psresource sqlserver
Statement : find-psresource sqlserver
PositionMessage : At line:1 char:1
+ find-psresource sqlserver
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : find-psresource
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
Environment data
PowerShell: 5.1 and 7.5.4
PSResourceGet: 1.1.1
Visuals
No response
- 主要语言
- C#
- 星标
- 577
- 派生
- 114
- 平均合并
- 23 小时 17 分钟
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PowerShell/PSResourceGet 的其他 Issue
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory未关闭
难度 2/5 1-3 小时 新手友好度 78/100
PowerShell/PSResourceGet#2056 ·
维护者通常 1 天内回复
-
feature_request
难度 2/5 1-3 小时 新手友好度 68/100
PowerShell/PSResourceGet#2013 · 3 条评论 ·
维护者通常 1 天内回复
-
Needs-Triage
难度 3/5 1-2 天 新手友好度 55/100
PowerShell/PSResourceGet#2060 ·
维护者通常 1 天内回复
-
Needs-Triage
难度 3/5 1-2 天 新手友好度 68/100
PowerShell/PSResourceGet#2059 ·
维护者通常 1 天内回复
-
Use GitHub app token to authenticate to GitHub resources可能已有人在做 @adityapatwardhan 于 13 天前认领。 未关闭feature_request Needs-Triage
PowerShell/PSResourceGet#2057 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 PowerShell/PSResourceGet 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
PCL-Community/PCL-CE#3652 ·
维护者通常 1 天内回复
-
area:frontend bug FE P3
难度 2/5 1-3 小时 新手友好度 68/100
klasolsson81/jobbliggaren#2010 ·
维护者通常 1 天内回复
-
agentic-workflows untriaged
难度 1/5 1 小时以内 新手友好度 65/100
维护者通常 1 天内回复
-
area: homeblaze type: bug
难度 2/5 1-3 小时 新手友好度 74/100
RicoSuter/Namotion.Interceptor#630 ·
维护者通常 1 天内回复
-
Akka.Hosting enhancement
难度 2/5 1-3 小时 新手友好度 65/100