fix: update ralph_import.sh (#148)

Fix ralph_import.sh CLI detection:
- Replace npx @anthropic/claude-code check with CLAUDE_CODE_CMD variable
- Quote CLAUDE_CODE_CMD to prevent shell expansion issues
- Add jq dependency check with installation guidance
This commit is contained in:
Dawen Ren 2026-02-02 04:28:26 +08:00 committed by GitHub
parent 02dbb078d7
commit 66947e7005
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -273,9 +273,13 @@ check_dependencies() {
log "ERROR" "Ralph not installed. Run ./install.sh first"
exit 1
fi
if ! npx @anthropic/claude-code --version &> /dev/null 2>&1; then
log "WARN" "Claude Code CLI not found. It will be downloaded when first used."
if ! command -v jq &> /dev/null; then
log "WARN" "jq not found. Install it (brew install jq | sudo apt-get install jq | choco install jq) for faster JSON parsing."
fi
if ! command -v "$CLAUDE_CODE_CMD" &> /dev/null 2>&1; then
log "WARN" "Claude Code CLI ($CLAUDE_CODE_CMD) not found. It will be downloaded when first used."
fi
}