chocolatey / chocolatey/choco

Add "-AuthCheck" to some "choco source" commands

Open
#947 2 comments 0 reactions 0 assignees View on GitHub
0 - Backlog Customer Enhancement Priority - Low Up For Grabs
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

Both in automation and interactive use it would be handy if choco source would fail if authentication fails.

It would also be necessary to support not authenticating in the case that a source is being added in automation when the machine is in a state where it cannot reach the source - but will be able to reach the source when it actually needs to be used.

I know that figuring out how to do auth checks in a universal way could be challenging - but right now I have to code an actual transaction to the source check it.

Some thoughts on possible implementation:

Support:
**choco source add [-AuthCheck [no|read|download|push]]** #(default =either "no" or "read")

**choco source list [-AuthCheck [no|read|download|push]]** #(default = "no" so that source lists are quick like now, works for individual sources or all sources depending on whether a specific source is specified)

Possible New Config:
authCheckSourcesDuringAdd = [no|read|download|push]

Contributor guide

Open the contributing guide

Research direction

Start by locating the `choco source add` and `choco source list` command entry points. Read how these commands currently contact or configure sources, then compare the proposed `-AuthCheck` modes and `authCheckSourcesDuringAdd` setting against the automation and offline scenarios described. Done means the supported authentication-check behavior and defaults are defined and covered for source add and list.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
authentication, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.