choco icon indicating copy to clipboard operation
choco copied to clipboard

Choco List command gives unexpected output when run against none existing source

Open ryanrichter94 opened this issue 3 years ago • 3 comments

What You Are Seeing?

When running choco list against a source that is not configured within the config of chocolatey sources on the machine the output of the command is "0 packages found."

What is Expected?

If you try to run a choco list against a source that is not configured on your machine the output should say source not configured on machine, please reference output of choco source list

How Did You Get This To Happen? (Steps to Reproduce)

Run choco list -s <Name of made up source> with a source that is not configured within Chocolatey on the machine and you will get "0 packages found." for output.

Output Log

image

ryanrichter94 avatar Apr 08 '21 12:04 ryanrichter94

In my experience this can also be the result of providing a URL source that is reachable but doesn't actually have a NuGet source available. Can cause some confusion if you just provide, for example https://server-address.com/ and forget to append the usual /api/v2/ to the end, and it just tells you there's no packages.

Would be better if there was a way to show that a) named sources don't exist, and b) even if the server is reachable, it should have some way to determine if there's a NuGet API endpoint at the given address and throw an error if not.

vexx32 avatar Apr 08 '21 13:04 vexx32

HI. Further down the line - same result when not using any switches, nor error indicating switch would be required. Fair to say it could just expect repo name as default without any switch? image

marcinkubica avatar Apr 08 '21 13:04 marcinkubica

Duplicate or some overlap with #1168

TheCakeIsNaOH avatar Jul 30 '22 01:07 TheCakeIsNaOH