Setting 'downloadsFolder' option in config as empty string deletes whole project(!) #26393
Labels
E2E
Issue related to end-to-end testing
Triaged
Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
type: bug
type: unexpected behavior
User expected result, but got another
Current behavior
Please see my fork cypress.config.js https://github.com/alexwoollam/cypress-test-tiny/blob/master/cypress.config.js
Adding the config option
downloadsFolder: ""
and runningcypress run
results in^- this error is due to the fact cypress has deleted the whole project folder (everything, including .git). This is probably by design, but presuming I didn't set downloadsFolder to the root of the project. Further testing with "../" set, in fact deletes the whole /var/www folder(!!!) (structure: /var/www/project ). Interestingly, I am not running cypress with sudo. I haven't tested this with a folder set as owned by other users yet.
Notes:
cypress open
and running specs, runs as expected.To reproduce:
ls -al
see the project.cypress run
.ls -al
, see an empty folder.Docs
https://docs.cypress.io/guides/references/configuration#Folders--Files
Cypress package version: 12.8.1
Cypress binary version: 12.8.1
Electron version: 21.0.0
Bundled Node version: 16.16.0
Desired behavior
Please idiot-proof this option.
Test code to reproduce
https://github.com/alexwoollam/cypress-test-tiny/
Cypress Version
12.8.1
Node version
16.1610
Operating System
Debian 11, Manjaro 6.1, MacOS 12
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: