Skip to content

Commit 1f8eb4f

Browse files
committed
fix shellcheck
1 parent 07dc267 commit 1f8eb4f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/scripts/check-link-foundation.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,18 @@ for LIB in ${LIBS_TO_CHECK}; do
4343

4444
# 1 is success (grep failed to find the lib), 0 is failure (grep successly found the lib)
4545
SUCCESS=$?
46-
[ "$SUCCESS" -eq 0 ] && log "${LIB} found." && break || log "${LIB} not found."
46+
if [ "$SUCCESS" -eq 0 ]; then
47+
log "${LIB} found." && break
48+
else
49+
log "${LIB} not found."
50+
fi
4751
done
4852

4953
popd || fatal "Failed to change directory back to the root directory."
5054

5155
# exit code is the opposite of the grep exit code
52-
[ "$SUCCESS" -eq 0 ] && error "❌ At least one foundation lib was found, reporting the error." || log "✅ No foundation lib found, congrats!" && exit 0
56+
if [ "$SUCCESS" -eq 0 ]; then
57+
error "❌ At least one foundation lib was found, reporting the error."
58+
else
59+
log "✅ No foundation lib found, congrats!" && exit 0
60+
fi

0 commit comments

Comments
 (0)