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

Getting environment variable in arguments? #52

Closed
jpetitcolas opened this issue Aug 12, 2016 · 3 comments
Closed

Getting environment variable in arguments? #52

jpetitcolas opened this issue Aug 12, 2016 · 3 comments

Comments

@jpetitcolas
Copy link

How can we handle environment variables from a concurrently command?

I need the full path of working directory in order to launch a Docker container. So, I need to use the $PWD environment variable.

With concurrently:

{
    "scripts": {
        "start": "concurrently 'echo ${PWD}'"
    }
}

It outputs ${PWD}. Yet, if I don't use concurrently:

{
    "scripts": {
        "start": "echo ${PWD}"
    }
}

It works. Any idea on how I can solve this? :)

@kimmobrunfeldt
Copy link
Contributor

Good question, I thought environment variables would be available in the commands. This should be fixed.

@kimmobrunfeldt
Copy link
Contributor

Could you test if this has been fixed by installing 3.0.0-dev version: npm i -g concurrently@3.0.0-dev ?
It should be better now because it is using https://github.com/kimmobrunfeldt/spawn-default-shell for spawning shell. At least simple echo worked for me.

@kimmobrunfeldt
Copy link
Contributor

These issues should be now fixed in 3.0.0-rc1. You can test by installing it: npm i -g concurrently@3.0.0-rc1. Please open a new issue to concurrently repo if this is not the case. I'll release the 3.0.0 soonish.

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