orchestrix 16.1.4 → 16.1.5
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.
|
@@ -107,7 +107,7 @@ if [ -f "$SETTINGS_LOCAL" ]; then
|
|
|
107
107
|
if command -v jq &>/dev/null; then
|
|
108
108
|
EXISTING=$(cat "$SETTINGS_LOCAL")
|
|
109
109
|
echo "$EXISTING" | jq --arg cmd "$HANDOFF_HOOK_CMD" \
|
|
110
|
-
'.hooks.Stop = (.hooks.Stop // []) + [{"hooks": [{"type": "command", "command": $cmd}]}]' \
|
|
110
|
+
'.hooks.Stop = (.hooks.Stop // []) + [{"matcher": "", "hooks": [{"type": "command", "command": $cmd}]}]' \
|
|
111
111
|
> "$SETTINGS_LOCAL.tmp" && mv "$SETTINGS_LOCAL.tmp" "$SETTINGS_LOCAL"
|
|
112
112
|
echo "✅ Handoff hook injected into existing settings.local.json"
|
|
113
113
|
else
|
|
@@ -116,15 +116,18 @@ if [ -f "$SETTINGS_LOCAL" ]; then
|
|
|
116
116
|
fi
|
|
117
117
|
else
|
|
118
118
|
# Create new settings.local.json with handoff hook
|
|
119
|
-
|
|
119
|
+
# IMPORTANT: Use quoted heredoc <<'EOF' to prevent $() execution and keep \" intact.
|
|
120
|
+
# The command string needs JSON-escaped quotes (\") around $(git rev-parse).
|
|
121
|
+
cat > "$SETTINGS_LOCAL" << 'SETTINGS_EOF'
|
|
120
122
|
{
|
|
121
123
|
"hooks": {
|
|
122
124
|
"Stop": [
|
|
123
125
|
{
|
|
126
|
+
"matcher": "",
|
|
124
127
|
"hooks": [
|
|
125
128
|
{
|
|
126
129
|
"type": "command",
|
|
127
|
-
"command": "$
|
|
130
|
+
"command": "bash -c 'cd \"$(git rev-parse --show-toplevel)\" && .orchestrix-core/scripts/handoff-detector.sh'"
|
|
128
131
|
}
|
|
129
132
|
]
|
|
130
133
|
}
|