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

[Bug] Second run of "Upgrade all" actually downgraded after first one was stopped with Ctrl+C #1559

Closed
venimus opened this issue May 4, 2018 · 7 comments

Comments

@venimus
Copy link

venimus commented May 4, 2018

What You Are Seeing?

I had chocolatey 0.10.8 installed, the latest version available was 0.10.10

I started "upgrade all" but on the prompt to confirm running the post-install script I pressed Ctrl+C so I can rerun it with "-y" parameter I forgot.
After the second run, cocolatey removed an incomplete installation and installed 0.10.7

What is Expected?

Remove latest incomplete install, not the current one. Keep the current version intact.

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

  1. Have outdated choco 0.10.8 installed (upgraded from 0.10.7 some time ago) when there is a new version (0.10.10) available.
  2. Start upgrade all (without -y)
  3. On the prompt "Do you want to run the script?([Y]es/[N]o/[P]rint):" Press Ctrl+C
  4. Run upgrade all with -y param

image

  1. 0.10.8 is removed and reverted to even older version

image

  1. I checked that to be sure. 3-rd run it installed the latest chocolatey

image

Output Log

https://gist.github.com/venimus/883f5c211855f1184b548716889fc148#file-c-programdata-chocolatey-logs-chocolatey-log-L4851

@ferventcoder
Copy link
Member

Control+C can cause erratic behavior. Maybe typing N would have been a better option?

@ferventcoder
Copy link
Member

Right now it's erratic but not necessarily a bug - we do need to get better about handling Control+C though. I am going to add this as a duplicate of one or more of the other Control+C known issues

@venimus
Copy link
Author

venimus commented May 4, 2018

I guess "no" will just stop the current script only. I didn't want to continue with the rest installs. May be an option "stop" would be good enough for bulk installs

@AdmiringWorm
Copy link
Member

@ferventcoder perhaps another option could be added to the the prompt?
Something along the line of Abort Update (or stop as @venimus suggest), if only one package would be upgraded, it would be essentially the same as No though.

@ferventcoder
Copy link
Member

I think it may not be a bad idea to have an Abort, which would essentially stop everything in progress for the whole run instead of just that one.

@bcurran3
Copy link

Global abort on Ctrl-C gets my vote.

@pauby
Copy link
Member

pauby commented Aug 28, 2024

Duplicate of #619

@pauby pauby marked this as a duplicate of #619 Aug 28, 2024
@pauby pauby closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
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

5 participants