PowerShell / PowerShell/PSResourceGet

Register/Set-PSRepository should error if API version is unknown

Open
#1,418 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-PSRepository feature_request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.