Files
Francesco Noacco a1293da7dd direnv: load nushell export output even when direnv fails
Starting nushell 0.111.0, pipefail is enabled by default. A non-zero
exit of `direnv export json` (e.g. on an `.envrc` or a `.env`, that has
not been explicitly allowed or blocked) raises an error in the middle
of the pipeline. That error aborts every pre_prompt hook registered
after direnv's. For instance, it stops atuin from finishing its history
entries, so commands run in such a directory are never recorded.

It also discards direnv's output, which is still meaningful on failure:
it unloads the environment of the directory being left and records the
blocked state, so the warning is shown only once. Other shells evaluate
it regardless of the exit status.

Run the export through `complete` so the exit status no longer raises
and stdout is always loaded. stderr is passed straight through, so
direnv's messages still show up as they happen.
2026-11-14 22:01:49 -06:00
..