deref / exo

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

[FEATURE] more direct way to refresh daemon environment #541

Open brandonbloom opened 2 years ago

brandonbloom commented 2 years ago

Right now, you have to do exo exit then restart the daemon to pickup any new environment variables at that level. It shouldn't be necessary to do this.

We may wish to explicitly invoke the user's preferred shell, so that we get a "clean" environment, instead of whatever environment exo happened to have been run in when it started the daemon.

brandonbloom commented 2 years ago

cc @finnigantime

brandonbloom commented 2 years ago

This will be fixed when #543 lands. See 82591c3.

brandonbloom commented 2 years ago

@stevekrenzel points out that the automatic environment refreshing logic means that something like FOO=123 exo start bar would not pass the FOO variable over to the bar program, which seems counter-intuitive. I think the new behavior of ignoring the ephemeral shell state is a better default, but definitely not ideal. Before closing this issue, we'll need to figure out if there is some way to handle/surface interactive environment differing from the default environment snapshot.