Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive Error When trying to Upgrade 2 or More packages in One Command #2895

Closed
ryanrichter94 opened this issue Nov 9, 2022 · 2 comments
Closed

Comments

@ryanrichter94
Copy link
Member

What You Are Seeing?

When running a choco upgrade command specifying more than one package I receive the following error.
No backup has been created before trying to reset the current configuration, and removal of the backup was not requested.

What is Expected?

This should just upgrade the packages I define in the command with no error.

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

  1. Have Chocolatey V 1.2.0 installed
  2. Run a choco upgrade googlechrome putty -y
  3. You'll receive the following error: No backup has been created before trying to reset the current configuration, and removal of the backup was not requested.

Tested this running choco V 1.1.0 and works as expected.

System Details

  • OS Build: 10.0.19045.0
  • Windows PowerShell version: 5.1.19041.1682
  • Chocolatey version: 1.2.0

Output Log

Relevant Part of Chocolatey Log

2022-11-09 10:51:29,771 6960 [ERROR] - No backup has been created before trying to reset the current configuration, and removal of the backup was not requested.
2022-11-09 10:51:29,771 6960 [ERROR] - More Details: System.InvalidOperationException: No backup has been created before trying to reset the current configuration, and removal of the backup was not requested.
   at chocolatey.infrastructure.app.configuration.ChocolateyConfiguration.reset_config(Boolean removeBackup)
   at chocolatey.infrastructure.app.services.NugetService.upgrade_run(ChocolateyConfiguration config, Action`1 continueAction, Boolean performAction, Action`1 beforeUpgradeAction)
   at chocolatey.infrastructure.app.services.NugetService.upgrade_run(ChocolateyConfiguration config, Action`1 continueAction, Action`1 beforeUpgradeAction)
   at chocolatey.infrastructure.app.services.ChocolateyPackageService.perform_source_runner_function[T](ChocolateyConfiguration config, Func`2 function)
   at chocolatey.infrastructure.app.services.ChocolateyPackageService.upgrade_run(ChocolateyConfiguration config)
   at chocolatey.infrastructure.app.runners.GenericRunner.run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
   at chocolatey.infrastructure.app.runners.ConsoleApplication.run(String[] args, ChocolateyConfiguration config, Container container)
   at chocolatey.console.Program.Main(String[] args)
2022-11-09 10:51:29,771 6960 [DEBUG] - Exiting with 1

References

@TheCakeIsNaOH
Copy link
Member

@ryanrichter94 probable duplicate of #2884?

@ryanrichter94
Copy link
Member Author

@TheCakeIsNaOH It is, sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants