[libcamera-ci,v1] lib: find_base(): Print error messages to stderr
diff mbox series

Message ID 20260803110247.109811-1-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [libcamera-ci,v1] lib: find_base(): Print error messages to stderr
Related show

Commit Message

Barnabás Pőcze Aug. 3, 2026, 11:02 a.m. UTC
Otherwise they will not be shown when used e.g. as

  base=$(find_base ...)

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 .gitlab-ci/lib.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--
2.55.0

Patch
diff mbox series

diff --git a/.gitlab-ci/lib.sh b/.gitlab-ci/lib.sh
index c804eee..4eb7000 100755
--- a/.gitlab-ci/lib.sh
+++ b/.gitlab-ci/lib.sh
@@ -15,14 +15,14 @@  find_base() {
 	local base=$(git merge-base $r1 $r2)

 	if [[ -z $base ]] ; then
-		echo "No common ancestor between $r1 and $r2."
-		echo "Make sure your master branch is up-to-date."
+		echo "No common ancestor between $r1 and $r2." >&2
+		echo "Make sure your master branch is up-to-date." >&2
 		exit 1
 	fi

 	if [[ $(git log --oneline $base..$r2 | wc -l) -gt 50 ]] ; then
-		echo "Common ancestor $base of $r1 and $r2 is too far in history."
-		echo "Make sure your master branch is up-to-date."
+		echo "Common ancestor $base of $r1 and $r2 is too far in history." >&2
+		echo "Make sure your master branch is up-to-date." >&2
 		exit 1
 	fi