You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[services] Fix issue where env var is ignored (#1570)
## Summary
Fixes#1565
The bugs:
* env vars specified via `--env-file` (and possibly via other methods)
are ignored in nginx config.
* When inside a devbox shell or a direnv context, starting services
would ignore env vars.
Intermediate causes:
* `envsubst` binary was a bin wrapped binary. This was resetting the env
vars. Fix: Never use bin wrappers when inside a `devbox run` (This was
previously only scoped to using the CLI command explicitly, but now we
do it any time we use RunScript function)
* Previously we would only run services in new shell if we were not
already in a shell or direnv. But this causes us to ignore environment
variables that are set after the environment is created due to bin
wrappers. Fix: always run services in new shell.
Root cause:
* I'm not 100% sure what caused this. It's possible the [PATH stack
PR](c11031a)
did, but I don't fully understand the mechanism. I'm still confident the
changes in this PR are good and simplify uncertainty about how services
are called.
Sorry in advance for all the boolean params. We should move to structs,
but I didn't want to make those changes here.
## How was it tested?
* Copied setup from #1565.
* Tried changing port and restarting services.
* Tested outside of devbox shell
* Tested inside of devbox shell
* Tested with direnv enabled
* Tested with direnv disabled
// TODO: Restart with no services should restart the _currently running_ services. This means we should get the list of running services from the process-compose, then restart them all.
0 commit comments