mirror of https://github.com/garrytan/gstack.git
fix: bash operator precedence in test framework detection
[ -f a ] || [ -f b ] && X="y" evaluates as A || (B && C), so the
assignment only runs when the second test passes. Wrap the OR group
in braces: { [ -f a ] || [ -f b ]; } && X="y".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a6c0b56b37
commit
a043d9a3ef
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "gstack",
|
"name": "gstack",
|
||||||
"version": "0.15.0.0",
|
"version": "0.15.2.0",
|
||||||
"description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.",
|
"description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
||||||
|
|
@ -870,10 +870,10 @@ DIFF_LINES=$(git diff origin/<base> --stat | tail -1 | grep -oE '[0-9]+ insertio
|
||||||
echo "DIFF_LINES: $DIFF_LINES"
|
echo "DIFF_LINES: $DIFF_LINES"
|
||||||
# Detect test framework for specialist test stub generation
|
# Detect test framework for specialist test stub generation
|
||||||
TEST_FW=""
|
TEST_FW=""
|
||||||
[ -f jest.config.ts ] || [ -f jest.config.js ] && TEST_FW="jest"
|
{ [ -f jest.config.ts ] || [ -f jest.config.js ]; } && TEST_FW="jest"
|
||||||
[ -f vitest.config.ts ] && TEST_FW="vitest"
|
[ -f vitest.config.ts ] && TEST_FW="vitest"
|
||||||
[ -f spec/spec_helper.rb ] || [ -f .rspec ] && TEST_FW="rspec"
|
{ [ -f spec/spec_helper.rb ] || [ -f .rspec ]; } && TEST_FW="rspec"
|
||||||
[ -f pytest.ini ] || [ -f conftest.py ] && TEST_FW="pytest"
|
{ [ -f pytest.ini ] || [ -f conftest.py ]; } && TEST_FW="pytest"
|
||||||
[ -f go.mod ] && TEST_FW="go-test"
|
[ -f go.mod ] && TEST_FW="go-test"
|
||||||
echo "TEST_FW: ${TEST_FW:-unknown}"
|
echo "TEST_FW: ${TEST_FW:-unknown}"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@ DIFF_LINES=$(git diff origin/<base> --stat | tail -1 | grep -oE '[0-9]+ insertio
|
||||||
echo "DIFF_LINES: $DIFF_LINES"
|
echo "DIFF_LINES: $DIFF_LINES"
|
||||||
# Detect test framework for specialist test stub generation
|
# Detect test framework for specialist test stub generation
|
||||||
TEST_FW=""
|
TEST_FW=""
|
||||||
[ -f jest.config.ts ] || [ -f jest.config.js ] && TEST_FW="jest"
|
{ [ -f jest.config.ts ] || [ -f jest.config.js ]; } && TEST_FW="jest"
|
||||||
[ -f vitest.config.ts ] && TEST_FW="vitest"
|
[ -f vitest.config.ts ] && TEST_FW="vitest"
|
||||||
[ -f spec/spec_helper.rb ] || [ -f .rspec ] && TEST_FW="rspec"
|
{ [ -f spec/spec_helper.rb ] || [ -f .rspec ]; } && TEST_FW="rspec"
|
||||||
[ -f pytest.ini ] || [ -f conftest.py ] && TEST_FW="pytest"
|
{ [ -f pytest.ini ] || [ -f conftest.py ]; } && TEST_FW="pytest"
|
||||||
[ -f go.mod ] && TEST_FW="go-test"
|
[ -f go.mod ] && TEST_FW="go-test"
|
||||||
echo "TEST_FW: \${TEST_FW:-unknown}"
|
echo "TEST_FW: \${TEST_FW:-unknown}"
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue