You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this is the correct repository for opening this issue.
I have verified no other issues exist related to my problem.
I have verified this is not an issue for a specific package.
I have verified this issue is not security related.
I confirm I am using official, and not unofficial, or modified, Chocolatey products.
What You Are Seeing?
A single pin command must be listed. Please see the help menu for those commands
What is Expected?
Adding the pin or an error why it did nor work.
How Did You Get This To Happen?
I wanted to add a pin for a package like the documentation said:
choco pin add --name="'ums'" --version="'13.8.0'" --reason="'choco v14.0 is a beta version'"
This did not work, but showed the following error: A single pin command must be listed. Please see the help menu for those commands
Well the help menu is where I got the commands from, so it was very confusing.
After some experimentaion I realized its because of the reason option. Leaving only that part out and it worked.
Back to the help page I noticed the original reason said something like "reasons available in business editions only", which I did not even read. It seemed like an example text, so why bother reading. I replaced it without thinking twice with my own text. Its probably not just an example text, but the reason the command failed I assume. So maybe that would be a good error message when using it anyways.
PS C:\WINDOWS\system32> choco pin add --name="'ums'" --version="'13.8.0'" --reason="'choco v14.0 is a beta version'" --debug --verbose
Chocolatey v2.2.2
Chocolatey is running on Windows v 10.0.19045.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" pin add --name='ums' --version='13.8.0'"--reason='choco v14.0 is a beta version'" --debug --verbose
Received arguments: pin add --name='ums' --version='13.8.0' --reason='choco v14.0 is a beta version' --debug --verbose
RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
Sending message 'PreRunMessage' out if there are subscribers...
[Pending] Removing all pending packages that should not be considered installed...
Sending message 'PostRunMessage' out if there are subscribers...
Chocolatey had an error occur:
System.ApplicationException: A single pin command must be listed. Please see the help menu for those commands
bei chocolatey.infrastructure.app.commands.ChocolateyPinCommand.ParseAdditionalArguments(IList`1 unparsedArguments, ChocolateyConfiguration configuration) bei chocolatey.infrastructure.app.runners.ConsoleApplication.<>c__DisplayClass0_1.<Run>b__5(IList`1 unparsedArgs) bei chocolatey.infrastructure.app.configuration.ConfigurationOptions.ParseArgumentsAndUpdateConfiguration(ICollection`1 args, ChocolateyConfiguration configuration, Action`1 setOptions, Action`1 afterParse, Action validateConfiguration, Action helpMessage) bei chocolatey.infrastructure.app.runners.ConsoleApplication.<>c__DisplayClass0_0.<Run>b__3(ICommand command) bei chocolatey.infrastructure.app.runners.GenericRunner.FindCommand(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs) 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)Exiting with 1
Additional Context
I would also suggest to add a highlight to the wrong parameter in the help page and command help.
The text was updated successfully, but these errors were encountered:
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue will be closed in 14 days if it continues to be inactive.
Checklist
What You Are Seeing?
A single pin command must be listed. Please see the help menu for those commands
What is Expected?
Adding the pin or an error why it did nor work.
How Did You Get This To Happen?
I wanted to add a pin for a package like the documentation said:
This did not work, but showed the following error:
A single pin command must be listed. Please see the help menu for those commands
Well the help menu is where I got the commands from, so it was very confusing.
After some experimentaion I realized its because of the reason option. Leaving only that part out and it worked.
Back to the help page I noticed the original reason said something like "reasons available in business editions only", which I did not even read. It seemed like an example text, so why bother reading. I replaced it without thinking twice with my own text. Its probably not just an example text, but the reason the command failed I assume. So maybe that would be a good error message when using it anyways.
System Details
Installed Packages
Output Log
Additional Context
I would also suggest to add a highlight to the wrong parameter in the help page and command help.
The text was updated successfully, but these errors were encountered: