From 6fd7c07f5b8dc9d011397b86661ba0d7eebc8207 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:25:56 -0300 Subject: [PATCH] fix(compilation): Make errors appear on CI fail --- .github/scripts/sketch_utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/sketch_utils.sh b/.github/scripts/sketch_utils.sh index 9a324bcbbaf..c02d5af4eed 100755 --- a/.github/scripts/sketch_utils.sh +++ b/.github/scripts/sketch_utils.sh @@ -221,9 +221,9 @@ function build_sketch(){ # build_sketch [ex --build-cache-path "$ARDUINO_CACHE_DIR" \ --build-path "$build_dir" \ $xtra_opts "${sketchdir}" \ - > $output_file + 2>&1 | tee $output_file - exit_status=$? + exit_status=${PIPESTATUS[0]} if [ $exit_status -ne 0 ]; then echo "ERROR: Compilation failed with error code $exit_status" exit $exit_status