[BUG] `PORT=x` env var passed in Procfile not working
finnigantime opened this issue · comments
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):
- OS: macOS
- Component cli
- Version
2021.10.29
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!
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!
Yeah, to be honest, I have no idea how it worked for you before ¯_(ツ)_/¯ Apologies for the confusion.