From 41a3cea2dc5faee6a884b7c05bc83cf7ce3148a3 Mon Sep 17 00:00:00 2001 From: Amir Khodak Date: Thu, 4 Jun 2026 12:23:24 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20fix=20SDK=20license=20accept=20(yes|=20SI?= =?UTF-8?q?GPIPE=20under=20pipefail=20=E2=86=92=20exit=20141)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use process substitution (< <(yes)) instead of a pipe so yes getting SIGPIPE when sdkmanager stops reading isn't propagated by pipefail. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f13437f..564ea16 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -40,7 +40,9 @@ jobs: https://dl.google.com/android/repository/commandlinetools-linux-9862592_latest.zip unzip -q /tmp/cmdtools.zip -d "$SDK/cmdline-tools" mv "$SDK/cmdline-tools/cmdline-tools" "$SDK/cmdline-tools/latest" - yes | "$SDK/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$SDK" --licenses >/dev/null + # Feed "y" via process substitution, not a pipe: `yes |` triggers SIGPIPE (exit 141) + # once sdkmanager stops reading, and the step shell runs with `-eo pipefail`. + "$SDK/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$SDK" --licenses >/dev/null < <(yes) "$SDK/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$SDK" \ "platform-tools" "platforms;android-34" "build-tools;34.0.0" >/dev/null