Skip to content

Commit 9a48894

Browse files
committed
chore(agents): note that git hooks need mise activation
1 parent d43cd05 commit 9a48894

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

home/dot_agents/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,4 @@ Always edit the source, not the deployed file. When updating any memory file: re
7373
- When a CLI can be managed by `mise`, run it through `mise x -- <command>`. Do not invoke managed tools directly.
7474
- When entering a new worktree that has a `mise.toml` or `.mise.toml`, run `mise trust <worktree-path>/{mise,.mise}.toml` (or the specific file present) before any `mise x --` call. Otherwise every mise invocation fails with `Config files in <path> are not trusted`.
7575
- **`mise x -- go install` puts binaries in mise's GOBIN, not `$HOME/go/bin/`.** mise's Go install has its own GOBIN (typically `<mise root>/installs/go/<ver>/bin/`), so binaries installed through `mise x -- go install ...` do not appear under `$HOME/go/bin/`. Scripts that fall back to `$HOME/go/bin/<tool>` will not find them. Either set `GOBIN=$HOME/go/bin mise x -- go install <pkg>` to land it there, or copy the resulting `<mise root>/installs/go/<ver>/bin/<tool>` into `$HOME/go/bin/` after install.
76+
- **Git hooks inherit the invoker's PATH, so mise-managed hook tools need mise activation.** When `pre-commit`, `bats`, or any other mise-managed binary is wired into `.git/hooks/*`, running `git commit` from a shell without mise on PATH fails with `<tool> not found. Did you forget to activate your virtualenv?` (or similar). Wrap the commit in `mise x -- bash -c 'git commit ...'` so the hook subprocess inherits the shim path; this is the default workaround whenever the Bash tool's plain PATH is missing mise's tools.

0 commit comments

Comments
 (0)