From 3116d90000ea9f47c38ff594b748c8da4b5054e2 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 16 May 2026 17:38:01 -0500 Subject: 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. --- scripts/install-ai.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/install-ai.sh') 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/)> " -- cgit v1.2.3