choco icon indicating copy to clipboard operation
choco copied to clipboard

Choco does not detect if the installation of packages has been interrupted

Open dcllt opened this issue 3 years ago • 1 comments

What You Are Seeing?

It seems like if user or something else cancel during download or installation, Choco treats package as successful. I can find the package by running 'choco list -l' .I saw this issue was already reported and closed here #198 . Despite this the problem seems to have reappeared.

What is Expected?

Detect if package installation was not completed.

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

Abort package installation by pressing Ctrl+C

System Details

This is on Choco 1.1.0

dcllt avatar Jul 05 '22 15:07 dcllt

Hello, same problem for me.

romain-marie avatar Aug 04 '22 14:08 romain-marie

Thanks for the report!

I haven't been able to reproduce what's being described here so far. Can you define:

  • Which package(s) you're seeing this with
  • Which terminal you're using to run choco (cmd? Windows Terminal? PowerShell? etc)
  • When during the installation you're pressing Ctrl+C
  • What operating system you're running choco on

I think we need additional detail here to have a better idea of what's going on and be able to reliably reproduce the issue.

vexx32 avatar Sep 30 '22 15:09 vexx32

Hello, here are the steps to reproduce :

  1. Have a Windows 10 pro 21H2 with chocolatey 1.1.0 installed, following instructions here : https://chocolatey.org/install
  2. Open powershell as administrator
  3. Enter choco install firefox then [ENTER]
  4. Wait for the line Do you want to run the script ... ?
  5. Close powershell window OR turn off PC (immediatly or during download or installation after hitting y)
  6. Open powershell again, enter choco list -l : firefox is listed, but is not installed on pc

romain-marie avatar Oct 03 '22 09:10 romain-marie

Thanks for that! I can confirm I'm seeing the same behaviour in my own environment as well. Definitely looks like something is going wrong with the pending files that we normally use to track incomplete package installations 🤔

As a workaround, you can choco uninstall firefox --skip-powershell to remove the package files before reinstalling, or use choco install firefox --force to forcibly reinstall the package, which will rerun the installer.

vexx32 avatar Oct 03 '22 12:10 vexx32