Direnv

From NovaOrdis Knowledge Base
Revision as of 02:18, 16 February 2022 by Ovidiu (talk | contribs) (→‎Installation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

External

Internal

Overview

Installation

brew install direnv

Configuration

https://direnv.net/docs/hook.html#bash

Add to .bashrc:

eval "$(direnv hook bash)"

Configuration

Create an .envrc file in the directory in question:

export JAVA_HOME="$(/usr/libexec/java_home -v 11)"
PATH_add "${JAVA_HOME}/bin"