From 7e6963457d41ba5c6df0228fc28eb112fe361ce3 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 21 Mar 2024 09:31:46 +0900 Subject: [PATCH] fix: add composer error check --- src/patch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/patch b/src/patch index b8b94bb..9ee579d 100755 --- a/src/patch +++ b/src/patch @@ -176,12 +176,15 @@ git reset composer.* git commit -m "Stage framework" --no-verify > /dev/null # Check for a specific requested version +set +e if [ "$TARGET_VERSION" ]; then OUTPUT=$(composer require --no-scripts --with-all-dependencies "$PACKAGE" "$TARGET_VERSION" 2>&1) # Otherwise get the latest else OUTPUT=$(composer update --no-scripts --with-all-dependencies "$PACKAGE" 2>&1) fi +try $? "Unable to checkout $PACKAGE\n$OUTPUT" +set -e for LINE in "$OUTPUT"; do echo "$LINE\n"