Merge pull request #1345 from gsd-build/fix/windows-shell-robustness-stdin-projectroot
fix: Windows hook stdin, workflow shell robustness, and project_root detection (#1343)
This commit is contained in:
@@ -390,7 +390,7 @@ Anti-pattern scanning (Step 7) checks for code smells. Behavioral spot-checks go
|
||||
|
||||
```bash
|
||||
# API endpoint returns non-empty data
|
||||
curl -s http://localhost:$PORT/api/$ENDPOINT 2>/dev/null | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); process.exit(Array.isArray(d) ? (d.length > 0 ? 0 : 1) : (Object.keys(d).length > 0 ? 0 : 1))"
|
||||
curl -s http://localhost:$PORT/api/$ENDPOINT 2>/dev/null | node -e "let b='';process.stdin.setEncoding('utf8');process.stdin.on('data',c=>b+=c);process.stdin.on('end',()=>{const d=JSON.parse(b);process.exit(Array.isArray(d)?(d.length>0?0:1):(Object.keys(d).length>0?0:1))})"
|
||||
|
||||
# CLI command produces expected output
|
||||
node $CLI_PATH --help 2>&1 | grep -q "$EXPECTED_SUBCOMMAND"
|
||||
|
||||
Reference in New Issue
Block a user