deref / exo

A process manager & log viewer for dev
https://exo.deref.io
Apache License 2.0
414 stars 17 forks source link

[BUG] `PORT=x` env var passed in Procfile not working #464

Closed finnigantime closed 3 years ago

finnigantime commented 3 years ago

Describe the bug My Profile includes:

foo: PORT=3000 cd ../foo && yarn dev

However, the PORT env var does not get passed correctly to the foo process, which ends up running on port 5200.

To Reproduce See above ^

Expected behavior Process foo runs on port 3000.

Screenshots n/a

System Info (please complete the following information):

brandonbloom commented 3 years ago

Hey Pat, I think this is working as intended, but you've got the usage a bit off. Please try this:

foo: cd ../foo && PORT=3000 yarn dev

The way you had it was passing the environment variable to cd, not yarn! I just tested this locally like this:

A=1 env && B=2 env

And the second call to env does not show A=1, which is what I'd expect.

If it still doesn't work, please reopen this issue & we'll investigate!

finnigantime commented 3 years ago

d'oh! I think this worked with an earlier version of exo (PORT env var was propagated to last command in the chain) and I failed to look at this closely before. Thanks!

brandonbloom commented 3 years ago

Yeah, to be honest, I have no idea how it worked for you before ¯_(ツ)_/¯ Apologies for the confusion.