Note that this only occurs when using the chocolatey.dll and installing multiple packages in a single process. Choco creates the CacheLocation by appending a chocolatey directory to the TEMP environment variable (https://github.com/chocolatey/choco/blob/master/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs#L198). Then later it sets the PATH environment variable from the CacheLocation (https://github.com/chocolatey/choco/blob/master/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs#L79). If one installs multiple packages in the same process, each install will cache to a deeper chocolatey directory until eventually path too long errors start failing packages. This is common in an application leveraging chocolatey as a library such as Boxstarter. This addresses the issue submitted at https://github.com/mwrock/boxstarter/issues/241.
Soon to follow I will submit a PR tha twill only append a chocolatey directory if one does not already exist.
Let's get this fixed in 0.10.4.
This will be in 0.10.4
Most helpful comment
Let's get this fixed in 0.10.4.