From cb465f2d3d306ab073d8c69534b214ebbbaade55 Mon Sep 17 00:00:00 2001 From: Nate Vick Date: Fri, 7 Aug 2026 15:55:29 -0700 Subject: [PATCH] docs: pass -b to the bootstrap so chezmoi lands on PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The installer defaults to BINDIR=bin, which is relative, so the README one-liner put chezmoi in $PWD/bin/chezmoi — not on PATH. The failure is delayed and confusing: the installer execs the binary it just placed, so `init --apply` succeeds and the machine looks fine until the next shell reports `chezmoi: command not found`. install.sh already passed -b "$HOME/.local/bin"; the README, which is the documented path for a new machine, did not. Not using get.chezmoi.io/lb: it hardcodes a relative .local/bin, so it only lands correctly when run from $HOME. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01H2p4TH5SX7B3J8oAQaidc8 --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ff9c7b..e8530e7 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,16 @@ Managed with [chezmoi](https://chezmoi.io). Source lives under `home/`. ## New machine ```sh -sh -c "$(curl -fsSL https://get.chezmoi.io)" -- init --apply natevick +sh -c "$(curl -fsSL https://get.chezmoi.io)" -- -b "$HOME/.local/bin" init --apply natevick ``` +`-b` is not optional. The installer defaults to `BINDIR=bin`, which is *relative* — without +it chezmoi lands in `$PWD/bin/chezmoi`, wherever you happened to run the command. The apply +still succeeds (the installer `exec`s the binary it just placed), so the breakage only shows +up afterwards as `chezmoi: command not found`. `~/.local/bin` is what `dot_zshenv` puts on +PATH. Don't substitute `get.chezmoi.io/lb` either — it hardcodes a relative `.local/bin` and +so only lands correctly when run from `$HOME`. + ## Devcontainer / Codespaces Point your dotfiles setting at `github.com/natevick/dotfiles`; it runs