Merge pull request #868 from gsd-build/fix/echo-jq-control-char-escape

fix: replace echo with printf to prevent jq parse errors
This commit is contained in:
TÂCHES
2026-03-02 12:11:41 -06:00
committed by GitHub
4 changed files with 11 additions and 11 deletions

View File

@@ -33,8 +33,8 @@ With existing decimals:
```bash ```bash
DECIMAL_INFO=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}") DECIMAL_INFO=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}")
DECIMAL_PHASE=$(echo "$DECIMAL_INFO" | jq -r '.next') DECIMAL_PHASE=$(printf '%s\n' "$DECIMAL_INFO" | jq -r '.next')
BASE_PHASE=$(echo "$DECIMAL_INFO" | jq -r '.base_phase') BASE_PHASE=$(printf '%s\n' "$DECIMAL_INFO" | jq -r '.base_phase')
``` ```
Or with --raw flag: Or with --raw flag:

View File

@@ -46,7 +46,7 @@ Use `roadmap get-phase` to validate phase exists:
```bash ```bash
PHASE_CHECK=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "${PHASE}") PHASE_CHECK=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "${PHASE}")
if [ "$(echo "$PHASE_CHECK" | jq -r '.found')" = "false" ]; then if [ "$(printf '%s\n' "$PHASE_CHECK" | jq -r '.found')" = "false" ]; then
echo "ERROR: Phase ${PHASE} not found in roadmap" echo "ERROR: Phase ${PHASE} not found in roadmap"
exit 1 exit 1
fi fi

View File

@@ -66,7 +66,7 @@ Find highest existing phase:
```bash ```bash
# Get sorted phase list, extract last one # Get sorted phase list, extract last one
PHASES=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phases list) PHASES=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phases list)
HIGHEST=$(echo "$PHASES" | jq -r '.directories[-1]') HIGHEST=$(printf '%s\n' "$PHASES" | jq -r '.directories[-1]')
``` ```
New phases continue from there: New phases continue from there:

View File

@@ -257,13 +257,13 @@ ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
Extract from INIT JSON: Extract from INIT JSON:
```bash ```bash
STATE_PATH=$(echo "$INIT" | jq -r '.state_path // empty') STATE_PATH=$(printf '%s\n' "$INIT" | jq -r '.state_path // empty')
ROADMAP_PATH=$(echo "$INIT" | jq -r '.roadmap_path // empty') ROADMAP_PATH=$(printf '%s\n' "$INIT" | jq -r '.roadmap_path // empty')
REQUIREMENTS_PATH=$(echo "$INIT" | jq -r '.requirements_path // empty') REQUIREMENTS_PATH=$(printf '%s\n' "$INIT" | jq -r '.requirements_path // empty')
RESEARCH_PATH=$(echo "$INIT" | jq -r '.research_path // empty') RESEARCH_PATH=$(printf '%s\n' "$INIT" | jq -r '.research_path // empty')
VERIFICATION_PATH=$(echo "$INIT" | jq -r '.verification_path // empty') VERIFICATION_PATH=$(printf '%s\n' "$INIT" | jq -r '.verification_path // empty')
UAT_PATH=$(echo "$INIT" | jq -r '.uat_path // empty') UAT_PATH=$(printf '%s\n' "$INIT" | jq -r '.uat_path // empty')
CONTEXT_PATH=$(echo "$INIT" | jq -r '.context_path // empty') CONTEXT_PATH=$(printf '%s\n' "$INIT" | jq -r '.context_path // empty')
``` ```
## 8. Spawn gsd-planner Agent ## 8. Spawn gsd-planner Agent