We recently made a small but significant change to the Chocolatey CLI install script that stops installation if the destination chocolatey folder exists at all.

This change in the installation behavior is aimed at reducing errors and stopping the contents of the folder being unexpectedly overwritten.

What’s Changing?

Previously, when you attempted to install Chocolatey CLI using our install script, it would proceed regardless of whether the chocolatey folder already existed on your system. This could sometimes lead to unexpected consequences when that folder was not empty.

With this update, the installation script will first check if the chocolatey folder exists. If it does, the script will skip the installation process to prevent any issues. If the folder doesn’t exist, the installation will proceed as usual, ensuring a clean and trouble-free installation.

How Does It Affect You?

If you are a new Chocolatey user or if you haven’t installed Chocolatey CLI on your computer yet, you won’t notice any significant changes. The installation process will proceed as expected.

For existing Chocolatey users who may already have the chocolatey folder on their computer, this change will prevent installation and potential issues for files and folders contained within it. If you do not need the chocolatey folder, simply remove it and run the Chocolatey CLI install script as normal. Always take a backup beforehand, just in case.

Where you have existing code, modules or integrations that relied on the previous behavior of the Chocolatey CLI install script, changes will need to be made. Ensure that the chocolatey folder does not exist before running the Chocolatey CLI install script and the installation will work just as it did before.

If you have any questions, and you are using Chocolatey CLI open-source, please reach out on Community Chat. For customers, please run choco support to find out your options.


comments powered by Disqus