diff --git a/CODE_GUIDELINES.md b/CODE_GUIDELINES.md index 2b378ef..ccd16f4 100644 --- a/CODE_GUIDELINES.md +++ b/CODE_GUIDELINES.md @@ -1363,6 +1363,8 @@ mix gettext.merge priv/gettext --on-obsolete=mark_as_obsolete ### 3.13 Task Runner: Just +The `Justfile` prepends `~/.asdf/shims`, `~/.asdf/bin`, and `~/.asdf` to `PATH` for all recipes (`set export := true`), so `mix` / `elixir` resolve from `.tool-versions` without shell init. The caller's `PATH` is kept (e.g. Homebrew `asdf`, Docker). Run `asdf install` once per machine; no extra `source` is required for `just run`. + **Common Commands:** ```bash diff --git a/Justfile b/Justfile index d08cef8..9b0be65 100644 --- a/Justfile +++ b/Justfile @@ -1,11 +1,11 @@ set dotenv-load := true set export := true -# Non-interactive shells do not source .bashrc, -# PATH includes asdf shims so that mix / elixir / iex resolve without per-shell -# `source ~/.asdf/asdf.sh`. Recipes inherit this via `set export := true`. -home := env_var('HOME') -PATH := home + "/.asdf/shims:" + home + "/.asdf:" + home + "/.local/bin:/usr/local/bin:/usr/bin:/bin" +# Prepend asdf paths so recipes work without sourcing ~/.asdf/asdf.sh in the shell. +# Caller PATH is preserved (Homebrew asdf, docker CLI, etc.). See CODE_GUIDELINES ยง3.13. +home := env_var("HOME") +asdf_paths := home + "/.asdf/shims:" + home + "/.asdf/bin:" + home + "/.asdf:" +PATH := asdf_paths + env_var("PATH") MIX_QUIET := "1"