mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-30 22:02:56 -08:00
Merge pull request #193 from element-hq/gaelg/ct-lint-error
ct-lint: fix errors were not catched
This commit is contained in:
2 files changed
+10
-7
No files matched your search
File renamed without changes.
+10
-7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user