PowerShell / PowerShell/PSResourceGet
Register/Set-PSRepository should error if API version is unknown
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
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
If you're registering a repository and it cannot figure out the API version via auto discovery (test v3 or v2, etc) and the user did not specify the API version then the repository should not be registered. From what I can tell the resource lifecycle cmdlets will not work with an unknown repository type so there is no need to register a non-working repository.
Expected behavior
If API version is not auto discovered or user provided do not register or update the repository URL. (Fail fast)
Actual behavior
Repository is registered creating errors in resource lifecycle cmdlets.
Error details
No response
Environment data
7.4-preview5
rc1
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the unknown-API case with Register-PSRepository and Set-PSRepository, then trace the repository registration path and the resource lifecycle cmdlets that consume it. Done means an unknown API version causes registration or update to fail without changing the repository URL, with regression coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100