diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-16 17:38:01 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-16 17:38:01 -0500 |
| commit | 3116d90000ea9f47c38ff594b748c8da4b5054e2 (patch) | |
| tree | 7927840bb16ef5a6e1225f18e2dcdf913e0cc1e9 | |
| parent | 9ceecd12094d19d5998e2c301835f7a7e1d4483f (diff) | |
| download | rulesets-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.
| -rwxr-xr-x | scripts/install-ai.sh | 2 |
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/)> " |
