choco icon indicating copy to clipboard operation
choco copied to clipboard

Define designated respected download folder

Open thatsIch opened this issue 5 years ago • 2 comments

One of the best improvements you can get while building your application in a CI/CD environment is reducing the time spending on downloading your dependencies from dependency managers like npm, apt and choco.

For Chocolatey exists %LocalAppData%\Temp\chocolatey where temporary files are stored, but it is not advised to cache that folder. Even when caching that folder choco does not respect the files contained in the temp folder and re-downloads them.

There is also C:\ProgramData\chocolatey\lib where all installed packages are located, but do not serve as a good cache for native installations (e.g. msi). This method is only advised to use for portable installations from zip files.

Looking at popular windows solutions like AppVeyor or Github Actions there is need to cache large downloads.

thatsIch avatar Mar 16 '20 18:03 thatsIch

Is there a recommended workaround for this or something blocking changes to support the feature?

(Asking here since https://github.com/chocolatey/choco/issues/2134 was noted as a duplicate, but the use-case is the same)

zanieb avatar Mar 09 '24 00:03 zanieb

The solution is to use a package repository that can be accessed by the CI system. That can be something like Nexus or Artifactory where you have internalized those packages. Or it could be a folder holding those packages that have been internalized.

To set expectations, this isn't something we've prioritised or currently working on. But as always, PR's are welcome.

pauby avatar Mar 09 '24 11:03 pauby