consult-mcp 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks-install.js +3 -2
- package/package.json +1 -1
package/dist/hooks-install.js
CHANGED
|
@@ -18,8 +18,9 @@ const shellQuote = (value) => `'${value.replaceAll("'", `'\\''`)}'`;
|
|
|
18
18
|
export function hookCommand(cmd) {
|
|
19
19
|
const launcher = [cmd.command, ...cmd.args.slice(0, -1), "hook"].map(shellQuote).join(" ");
|
|
20
20
|
return [
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
// No glob: hosts may run hooks through zsh, which fails the whole command when a glob matches nothing.
|
|
22
|
+
'i=$(cat); for s in $(ls "${XDG_STATE_HOME:-$HOME/.local/state}/consult/inbox" 2>/dev/null); do',
|
|
23
|
+
`case "$i" in *"$s"*) printf '%s' "$i" | ${MARKER} PATH=${shellQuote(cmd.path)}:"$PATH" ${launcher}; break;; esac;`,
|
|
23
24
|
"done; exit 0",
|
|
24
25
|
].join(" ");
|
|
25
26
|
}
|
package/package.json
CHANGED