aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-16 17:38:01 -0500
committerCraig Jennings <c@cjennings.net>2026-05-16 17:38:01 -0500
commit3116d90000ea9f47c38ff594b748c8da4b5054e2 (patch)
tree7927840bb16ef5a6e1225f18e2dcdf913e0cc1e9 /scripts
parent9ceecd12094d19d5998e2c301835f7a7e1d4483f (diff)
downloadrulesets-3116d90000ea9f47c38ff594b748c8da4b5054e2.tar.gz
rulesets-3116d90000ea9f47c38ff594b748c8da4b5054e2.zip
refactor(install-ai): use explicit if block for .ai/-missing filter
The `[ ] && echo` shortcut propagates the test's exit status out of the while loop, which can muddy the pipeline's overall exit. The `if` form keeps the loop body's status decoupled from the filter check.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-ai.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/install-ai.sh b/scripts/install-ai.sh
index d30ab84..8993f0d 100755
--- a/scripts/install-ai.sh
+++ b/scripts/install-ai.sh
@@ -63,7 +63,7 @@ if [ -z "$project" ]; then
find "$HOME/code" "$HOME/projects" -maxdepth 2 -mindepth 1 -type d -name .git 2>/dev/null \
| sed 's|/\.git$||' \
| while read -r p; do
- [ ! -e "$p/.ai" ] && echo "$p"
+ if [ ! -e "$p/.ai" ]; then echo "$p"; fi
done \
| sort \
| fzf --prompt="Target project (without .ai/)> "