Open CSchulz opened 1 year ago
@CSchulz
You can change the cache location. See https://docs.cypress.io/guides/references/advanced-installation#Binary-cache.
Which operating system are you using?
If this is a Linux operating system, the default is ~/.cache/Cypress
and it can be changed using CYPRESS_CACHE_FOLDER
.
This issue list is actually for documentation issues only.
You might like to connect also to the Cypress technical community on Discord
Moving to the Cypress repo as this doesn't appear to be an issue with the docs
This doesn't work for the appdata folder. We are already using export CYPRESS_CACHE_FOLDER="/var/lib/jenkins/.cache/cypress"
@CSchulz
Can you please let us know which operating system you are using?
Platform: linux-x64 (Red Hat Linux - 8.8)
Cypress Version: 12.17.0
@CSchulz
Thanks for your OS (Red Hat Linux - 8.8)! I confirmed that I can reproduce on Ubuntu 22.04.
The App Data is stored in
~/.config/Cypress/cy/production
which is not influenced by the environment variable CYPRESS_CACHE_FOLDER="/var/lib/jenkins/.cache/cypress"
.
Only the cache data is stored in
/var/lib/jenkins/.cache/cypress
Sorry for my previous misleading comments!
@CSchulz
The home folder of our jenkins user is
/var/lib/jenkins
, but for any reason Cypress@12.17.0 tries to use/home/jenkins/
.
Cypress will use ~
to find the home folder.
What does
echo ~
show? Is it /var/lib/jenkins
or /home/jenkins
?
On Ubuntu with
export HOME='/var/lib/jenkins'
npx cypress info
shows
Application Data: /var/lib/jenkins/.config/cypress/cy/development
Browser Profiles: /var/lib/jenkins/.config/cypress/cy/development/browsers
Binary Caches: /var/lib/jenkins/.cache/Cypress
Cypress Version: 12.17.0 (stable)
System Platform: linux (Ubuntu - 22.04)
Yes I can confim the paths are based on the HOME variable.
I would like to suggest that there should be also an environment variable to override this behavior because it could be possible that the app data folder gets too big or similar issues.
This sounds like a reasonable feature request. I'll label it as such. I am not sure if this is something that is configurable on every OS, though.
Would you be interested in making a PR by any chance?
Description
When I start Cypress@12.17.0, I expected existing folders are reused but another unknown folder is used instead.
URL of Issue(s)
None
Steps to replicate
Browser
No response
Device
Additional Information
The home folder of our jenkins user is /var/lib/jenkins, but for any reason Cypress@12.17.0 tries to use /home/jenkins/.
The configuration page doesn't state any property to configure this folder.