-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed as not planned
Labels
pkg/serverThis is due to an issue in the packages/server directoryThis is due to an issue in the packages/server directorystage: ready for workThe issue is reproducible and in scopeThe issue is reproducible and in scopestaleno activity on this issue for a long periodno activity on this issue for a long periodtype: bug
Description
Current behavior:
When supportFile is pointing to a symlinked path we get the error "Your supportFile is set to /whatever/support/index.js/index.js"
Where the "index.js" is repeated
Desired behavior:
supportFile should support symlinked paths
Steps to reproduce: (app code and test code)
- Create the structure "foo/support/index.js"
- Create the a symlink "bar" linking to "foo"
- Set cypress
supportFileconfiguration to "bar/support/index.js" - Observe the error
Versions
Cypress 3.1.5
Node 11.6.0
Linux Ubuntu 18.04
Additional info
The cause of the problem is
cypress/packages/server/lib/config.coffee
Line 367 in ce3ab55
| obj.supportFile = path.join(sf, path.basename(obj.supportFile)) |
It assume sf is a path and does not contain the filename.
But that is incorrect. sf is resolved to the full path, including index.js.
The line should probably become obj.supportFile = path.join(path.dirname(sf), path.basename(obj.supportFile))
guastallaigor
Metadata
Metadata
Assignees
Labels
pkg/serverThis is due to an issue in the packages/server directoryThis is due to an issue in the packages/server directorystage: ready for workThe issue is reproducible and in scopeThe issue is reproducible and in scopestaleno activity on this issue for a long periodno activity on this issue for a long periodtype: bug