| 12345678910111213141516171819202122232425262728293031 |
- #!/bin/bash
- # Test script to verify Claude runs in non-interactive mode
- echo "Testing Claude in non-interactive mode..."
- echo "Starting at: $(date)"
- echo ""
- # Add claude to PATH
- export PATH="$HOME/.local/bin:$PATH"
- # Simple test prompt
- TEST_PROMPT="Please respond with 'Hello from non-interactive mode!' and nothing else."
- echo "Running: claude --print --dangerously-skip-permissions \"$TEST_PROMPT\""
- echo "---"
- # Run Claude and capture output
- OUTPUT=$(claude --print --dangerously-skip-permissions "$TEST_PROMPT" 2>&1)
- EXIT_CODE=$?
- echo "$OUTPUT"
- echo "---"
- echo "Exit code: $EXIT_CODE"
- echo "Completed at: $(date)"
- if [ $EXIT_CODE -eq 0 ]; then
- echo "✓ SUCCESS: Claude ran non-interactively"
- else
- echo "✗ FAILED: Claude exited with code $EXIT_CODE"
- fi
|