-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API] Chocolatey file cache adds a 'chocolatey' directory on each install #1210
Comments
mwrock
added a commit
to mwrock/choco
that referenced
this issue
Mar 28, 2017
…ation This ensures that the CacheLocation only appends chocolatey to the TEMP variable if it has not already been added. Otherwise multiple package installs in the same process result in an ever deeper nested chocolatey cache folders.
Let's get this fixed in 0.10.4. |
ferventcoder
changed the title
Chocolatey file cache adds a 'chocolatey' directory on each install
[API] Chocolatey file cache adds a 'chocolatey' directory on each install
Mar 28, 2017
ferventcoder
pushed a commit
that referenced
this issue
Mar 28, 2017
This ensures that the CacheLocation only appends chocolatey to the TEMP variable if it has not already been added. Otherwise multiple package installs in the same process result in an ever deeper nested chocolatey cache folders, resulting in eventual `PATH too long` errors. This appears to affect only API usage of Chocolatey.
ferventcoder
added a commit
that referenced
this issue
Mar 28, 2017
* pr1211: (GH-1210) CacheLocation - Prevent nested chocolatey directories
ferventcoder
added a commit
that referenced
this issue
Mar 28, 2017
* stable: (GH-1210) CacheLocation - Prevent nested chocolatey directories (GH-1209) Add Chocolatey Software to copyright (GH-1180) Ensure values are escaped for regex (maint) note about removing section (GH-797) Conditionally remember execution timeout (GH-1208) auto uninstaller - split by quotes (maint) formatting (GH-797) Use remembered arguments when upgrading (GH-797) Encrypt & remember certain arguments (GH-797) OptionSet available globally (GH-797) Move check for sensitive data to function (maint) update tab expansion for 0.10.4 & licensed (GH-797) Add remembered arguments parameters (doc) update CHANGELOG/nuspec (docs) update licensed changelog
This will be in 0.10.4 |
mwrock
added a commit
to mwrock/choco
that referenced
this issue
Apr 3, 2017
The former fix (chocolateyGH-1210) fails when the CacheLocation ends with a slash. This uses a DirectoryInfo instance to examine the last directory in the path in a more robust manner
mwrock
added a commit
to mwrock/choco
that referenced
this issue
Apr 3, 2017
The former fix (chocolateyGH-1210) fails when the CacheLocation ends with a slash. This uses a DirectoryInfo instance to examine the last directory in the path in a more robust manner
mwrock
added a commit
to mwrock/choco
that referenced
this issue
Apr 3, 2017
The former fix (chocolateyGH-1210) fails when the CacheLocation ends with a slash. This uses a DirectoryInfo instance to examine the last directory in the path in a more robust manner
mwrock
added a commit
to mwrock/choco
that referenced
this issue
Apr 4, 2017
The former fix (chocolateyGH-1210) fails when the CacheLocation ends with a slash. This uses a DirectoryInfo instance to examine the last directory in the path in a more robust manner
mwrock
added a commit
to mwrock/choco
that referenced
this issue
Apr 4, 2017
The former fix (chocolateyGH-1210) fails when the CacheLocation ends with a slash. This uses a DirectoryInfo instance to examine the last directory in the path in a more robust manner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that this only occurs when using the
chocolatey.dll
and installing multiple packages in a single process. Choco creates theCacheLocation
by appending achocolatey
directory to theTEMP
environment variable (https://github.com/chocolatey/choco/blob/master/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs#L198). Then later it sets thePATH
environment variable from theCacheLocation
(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 eventuallypath 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 chocolatey/boxstarter#241.Soon to follow I will submit a PR tha twill only append a
chocolatey
directory if one does not already exist.The text was updated successfully, but these errors were encountered: