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

environment variable not accessible #102

Open
arunzone opened this issue Jul 22, 2021 · 2 comments
Open

environment variable not accessible #102

arunzone opened this issue Jul 22, 2021 · 2 comments

Comments

@arunzone
Copy link

wait-on https-get://$DEMO_URL && npm run cypress run
Is there any way I can pass/substitute environment variable in the url
I want to run this in different environment
it si stuck forever
> wait-on https-get://$DEMO_URL && npm run cypress run

@kamolins
Copy link

kamolins commented Oct 7, 2021

This is not an issue with this library.
While it isn't impossible to somehow make it work as you want, I would suggest the following:
Create a JS script that is invoking wait-on programmatically and then you can simply access your demo URL with proess.env.DEMO_URL

Edit: If you are just running it in a shell script, it should substitute it by default if DEMO_URL has a value. It does get trickier if you want to define that inside an NPM script.

@joelbernstein
Copy link

This is an odd question. The shell will interpolate the values of any environment variables long before it exec's node.

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

3 participants