Choco does not detect if the installation of packages has been interrupted
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
Hello, same problem for me.
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.
Hello, here are the steps to reproduce :
- Have a Windows 10 pro 21H2 with chocolatey 1.1.0 installed, following instructions here : https://chocolatey.org/install
- Open powershell as administrator
- Enter
choco install firefoxthen [ENTER] - Wait for the line
Do you want to run the script ... ? - Close powershell window OR turn off PC (immediatly or during download or installation after hitting
y) - Open powershell again, enter
choco list -l: firefox is listed, but is not installed on pc
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.