Skip to content
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

Allow setting baseUrl from cypress.env.json #2499

Closed
raineroviir opened this issue Sep 20, 2018 · 2 comments
Closed

Allow setting baseUrl from cypress.env.json #2499

raineroviir opened this issue Sep 20, 2018 · 2 comments

Comments

@raineroviir
Copy link
Contributor

Right now Cypress only respects the baseUrl setting when it is defined in cypress.json but I think it should respect it also from cypress.env.json.

More info on baseUrl:
https://docs.cypress.io/guides/references/best-practices.html#Web-Servers

@brian-mann
Copy link
Member

This has been asked before about a year ago and there was a long discussion about it.

#909

In short, it makes no sense because cypress.env.json is about environment variables, not configuration. It would just end up acting like cypress2.json, and all the overrides regarding cypress.json can instead be programmatically altered which is all around much better because you are likely just trying to do things like swap out multiple dev vs staging vs prod environments.

You can already do that in the most clean / effective manner using the Configuration API - and then you can organize things in whatever way you'd like.

@raineroviir
Copy link
Contributor Author

raineroviir commented Sep 20, 2018

Got it, thanks! The URL you posted must have gotten messed up, here is what I believe you were trying to link to docs.cypress.io/api/plugins/configuration-api.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants