chocolatey / chocolatey-licensed-issues

Issues for Licensed Editions of Chocolatey
19 stars 13 forks source link

Changes to the list parameter not understandable #348

Closed threechord82 closed 1 year ago

threechord82 commented 1 year ago

Checklist

What You Are Seeing?

We run an internal repo which we keep up to date using the updatescript. (https://docs.chocolatey.org/en-us/guides/organizations/automate-package-internalization#script-update-prodrepofromtest.ps1) Unfortunately, this script is no longer executable with the rollout of version 2.0.

It doesn't matter if I use the name of the internal repo or the address. I get the statement every time: "choco list --source $TestRepo --all-versions --limit-output When using the '--source' option with the 'choco list' command, only a named alternative source can be provided."

It doesn't matter if I enter the address of the source in the variable (https://xxxx.yyyyyy.zzz/repository/choco-hosted/) or the name I gave to the source (choco_internal).

Unfortunately, the help in this regard does not really provide an explanation of how the command must now be.

What is Expected?

I expected the updatescript to be still functional

How Did You Get This To Happen?

I run the script daily (with variables set, of course). But since the update to version 2.0 this script does not run anymore

System Details

Installed Packages

N/A

Output Log

Chocolatey had an error occur:
System.ApplicationException: When using the '--source' option with the 'choco list' command, only a named alternative source can be provided.
   bei chocolatey.infrastructure.app.commands.ChocolateyListCommand.Run(ChocolateyConfiguration config)
   bei chocolatey.licensed.infrastructure.app.commands.ProChocolateyListCommand.#=zFy_ZTe9J$E85AE1jCA==.#=zoTHROGpJL1HsaRJa3Q==()
   bei chocolatey.licensed.infrastructure.app.utility.BackgroundServiceUtility.Run(LicensedChocolateyConfiguration configuration, Action originalRunAction)
   bei chocolatey.infrastructure.app.runners.GenericRunner.Run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
   bei chocolatey.infrastructure.app.runners.ConsoleApplication.Run(String[] args, ChocolateyConfiguration config, Container container)
   bei chocolatey.console.Program.Main(String[] args)

Additional Context

No response

pauby commented 1 year ago

There is a sticky issue which points to the upgrade guide. Specifically, see the changes to choco list.

While the choco list command is still used to query alternative sources, it cannot be used to query remote sources. Please use choco search instead. For example, if you used choco list --source="''", you should use choco search --source="''" instead.

Thanks for pointing out the issues with our docs. I'll get them amended just now.

threechord82 commented 1 year ago

Thanks for the quick reply. That solves my problem already.

pauby commented 1 year ago

I've submitted a PR to update the docs, just now. I'll close this once that is merged.

pauby commented 1 year ago

PR is merged and live. I'm going to go ahead and close this, but we can reopen it if necessary.