lorri icon indicating copy to clipboard operation
lorri copied to clipboard

lorri init .envrc: fall back to `use nix`

Open Profpatsch opened this issue 3 years ago • 4 comments

A trivial improvement, the default .envrc should check whether lorri is installed and if not fall back to the direnv-native use nix.

Profpatsch avatar Aug 10 '21 19:08 Profpatsch

Like this?

if has lorri; then
  eval "$(lorri direnv)"
else
  use nix
fi

SuperSandro2000 avatar Aug 10 '21 21:08 SuperSandro2000

yeah, with type lorri >/dev/null I guess

Profpatsch avatar Aug 14 '21 21:08 Profpatsch

yeah, with type lorri >/dev/null I guess

That would need to be type -P lorri &>/dev/null.

SuperSandro2000 avatar Aug 14 '21 21:08 SuperSandro2000

Maybe also include a link to lorri in the fallback case?

chisui avatar Jan 07 '22 17:01 chisui