From 208d4beb9d1ce6d826f11b0274bc587c37e0f4b8 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 26 Aug 2025 11:05:33 -0400 Subject: Fix boolean in ai linter If there are no lints to fix, this should just exit without starting aider. --- Omni/Ide/ailint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Omni/Ide/ailint.sh b/Omni/Ide/ailint.sh index 55d6ebe..a107be8 100755 --- a/Omni/Ide/ailint.sh +++ b/Omni/Ide/ailint.sh @@ -3,4 +3,9 @@ set -xu target=${1:?} instructions=$(mktemp) echo "Fix the following lint errors, or silence them with a `# noqa:` comment if they aren't problematic:" >> "$instructions" -[[ ! $(lint -f "$target" >> "$instructions" 2>&1) ]] && aider --yes --message-file "$instructions" "$target" +if lint -f "$target" >> "$instructions" 2>&1 +then + echo "no bad lints" +else + aider --yes --message-file "$instructions" "$target" +fi -- cgit v1.2.3