@@ -44,7 +44,9 @@ disallow the use of Haskell (but we love you, Simon Peyton Jones).
46The first thing we need to do is hook up our hook. Let's add the following to
46The first thing we need to do is hook up our hook. Let's add the following to
47−our local `crush.json`. You can, of course, do this globally, too.
47+our **project-level** `crush.json`. Relative paths like `./no-haskell.sh` work
48+here because the project root is your working directory. If you're configuring
49+a global hook (`~/.config/crush/crush.json`), use an absolute path instead.
@@ -146,6 +148,28 @@ and project-level, with project level hooks taking precedence.
152+> The `command` is resolved relative to your **current working directory** —
153+> not relative to the config file. Relative paths like `./hooks/whatever.sh`
154+> work fine in project-level `crush.json` because the project root is also
155+> your working directory. For **global** config (`~/.config/crush/`),
156+> however, you must use either an absolute path or an inline command:
159+> // Global ~/.config/crush/crush.json
164+> "command": "/home/you/.config/crush/hooks/no-haskell.sh"
165+> // or use an inline command:
166+> // "command": "echo '{\"decision\":\"allow\"}'"
149Remember, hooks will run in parallel but resolve in config order. Last hook
173Remember, hooks will run in parallel but resolve in config order. Last hook
150wins when rewriting input, but first deny wins when blocking.
174wins when rewriting input, but first deny wins when blocking.