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

Comments

Projects
None yet
2 participants
@jpetitcolas

jpetitcolas commented Aug 12, 2016

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

This comment has been minimized.

Show comment
Hide comment
@kimmobrunfeldt

kimmobrunfeldt Sep 12, 2016

Owner

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

Owner

kimmobrunfeldt commented Sep 12, 2016

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

@kimmobrunfeldt

This comment has been minimized.

Show comment
Hide comment
@kimmobrunfeldt

kimmobrunfeldt Sep 18, 2016

Owner

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.

Owner

kimmobrunfeldt commented Sep 18, 2016

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

This comment has been minimized.

Show comment
Hide comment
@kimmobrunfeldt

kimmobrunfeldt Sep 19, 2016

Owner

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.

Owner

kimmobrunfeldt commented Sep 19, 2016

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