Choco: [API] Chocolatey file cache adds a 'chocolatey' directory on each install

Created on 28 Mar 2017  路  2Comments  路  Source: chocolatey/choco

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.

3 - Done API Bug Priority_HIGH

Most helpful comment

Let's get this fixed in 0.10.4.

All 2 comments

Let's get this fixed in 0.10.4.

This will be in 0.10.4

Was this page helpful?
0 / 5 - 0 ratings