diff --git a/newsfragments/187.internal.md b/newsfragments/193.internal.md similarity index 100% rename from newsfragments/187.internal.md rename to newsfragments/193.internal.md diff --git a/scripts/ct-lint.sh b/scripts/ct-lint.sh index a8f40f0f..d18ea045 100644 --- a/scripts/ct-lint.sh +++ b/scripts/ct-lint.sh @@ -4,17 +4,20 @@ # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +set -euo pipefail temp_output_file=$(mktemp) -# Call the ct lint command and stream the output to stdout -ct lint "$@" 2>&1 | tee "$temp_output_file" - error=1 -# Check if there are any "[INFO] Fail:" lines in the output -(grep -q '\[INFO\] Fail:' "$temp_output_file") || \ -(grep -q '\[INFO\] Missing required value:' "$temp_output_file") ||\ -error=0 + +# Call the ct lint command and stream the output to stdout +if ct lint "$@" 2>&1 | tee "$temp_output_file" +then + # Check if there are any "[INFO] Fail:" lines in the output + (grep -q '\[INFO\] Fail:' "$temp_output_file") || \ + (grep -q '\[INFO\] Missing required value:' "$temp_output_file") ||\ + error=0 +fi if [ "$error" -eq 1 ]; then # If found, exit with status code 1