`cd` and `export` are global and not per thread
bfrk opened this issue · comments
These commands change the global state of the process, so a cd
or export
in one thread will have an effect on all other threads as well. This is obvious in retrospect, as these commands can run directly in IO
, whereas similar libraries like shelly have their own monad transformer to keep this state local. Still, the documentation could make this behavior more explicit as it is quite a pitfall to run into.
The fix is up here: #389