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?
If a user does install a package choco install whatever and during the installation presses strg + c, the current chocolateyInstall.ps1 gets aborted. Sadly the overall installation gets not aborted, it seems only the context of the chocolateyInstall.ps1 is stopped but the Chocolatey core continues it's logic. As a result, the package will be listed as installed package - even so we stopped the actual installation and the package gets not finished.
To work aground this, we would need to react on the strg + c event and manually set the install state to failed (Set-PowerShellExitCode).
There might be a global way to solve this by registering a trap for this to be implemented inside the Chocolatey core where the chocolateyInstall.ps1 etc. scripts gets called and bypassing the state change from uninstalled to installed - so as a result aborting the installation with strg + c will not result in an installed package.
What is Expected?
If I abort the installed by strg + c and the package instalaltion was not finished, the package installation should be aborted or as a result, the package should be in state of not installed.
How Did You Get This To Happen?
choco install whatever
Hit strg + c to interrupte the installer
Type choco list and you will see that whatever was installed successfully
System Details
Operating System: Windows 11
Windows PowerShell version: 5.1
Chocolatey CLI Version: 2.2.2
Chocolatey Licensed Extension version: -
Chocolatey License type: -
Terminal/Emulator: cmd / powershell
Installed Packages
-
Output Log
-
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Checklist
What You Are Seeing?
If a user does install a package
choco install whatever
and during the installation pressesstrg + c
, the currentchocolateyInstall.ps1
gets aborted. Sadly the overall installation gets not aborted, it seems only the context of thechocolateyInstall.ps1
is stopped but the Chocolatey core continues it's logic. As a result, the package will be listed as installed package - even so we stopped the actual installation and the package gets not finished.To work aground this, we would need to react on the
strg + c
event and manually set the install state to failed (Set-PowerShellExitCode
).There might be a global way to solve this by registering a trap for this to be implemented inside the Chocolatey core where the
chocolateyInstall.ps1
etc. scripts gets called and bypassing the state change from uninstalled to installed - so as a result aborting the installation withstrg + c
will not result in an installed package.What is Expected?
If I abort the installed by
strg + c
and the package instalaltion was not finished, the package installation should be aborted or as a result, the package should be in state of not installed.How Did You Get This To Happen?
choco install whatever
strg + c
to interrupte the installerchoco list
and you will see thatwhatever
was installed successfullySystem Details
Installed Packages
Output Log
Additional Context
No response
The text was updated successfully, but these errors were encountered: