Skip to content

Commit e2d0428

Browse files
authored
Improve curl failure messages (#1314)
[When the `install-thrift` script fails](https://github.com/hazelcast/client-compatibility-suites/actions/runs/15922496200/job/44912990844), the error is unhelpful: > Error: Process completed with exit code 28. Copied the arguments we use elsewhere in the repo (specifically `--show-error`) to give more info. Also refactored the `install-thrift` script with the changes already applied to `install-boost` in #1257
1 parent 78362e7 commit e2d0428

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scripts/install-boost.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fi
1212

1313
TARBALL_NAME=boost_$(echo "$1" | tr . _)
1414

15-
curl --silent --location "https://archives.boost.io/release/${1}/source/${TARBALL_NAME}.tar.gz" | tar xzf -
15+
curl --fail --silent --show-error --location "https://archives.boost.io/release/${1}/source/${TARBALL_NAME}.tar.gz" | tar xzf -
1616
pushd "${TARBALL_NAME}"
1717
./bootstrap.sh
1818
./b2 --with-thread --with-chrono install

scripts/install-thrift.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
# Installs Apache Thrift from source
44
# usage ./install-thrift.sh <version>
55

6-
set -e
6+
set -o errexit ${RUNNER_DEBUG:+-x}
77

8-
if [ "$#" -ne 1 ]; then
8+
if [[ "$#" -ne 1 ]]; then
99
echo "usage: $0 <version>"
1010
exit 1
1111
fi
1212

13-
curl --silent -Lo thrift-$1.tar.gz https://archive.apache.org/dist/thrift/$1/thrift-$1.tar.gz
14-
tar xzf thrift-$1.tar.gz
15-
cd thrift-$1/build
13+
curl --fail --silent --show-error --location https://archive.apache.org/dist/thrift/$1/thrift-$1.tar.gz | tar xzf -
14+
pushd thrift-$1/build
1615
cmake .. -DBUILD_COMPILER=OFF -DBUILD_TESTING=OFF -DBUILD_TUTORIALS=OFF -DBUILD_LIBRARIES=ON \
1716
-DBUILD_CPP=ON -DBUILD_AS3=OFF -DBUILD_C_GLIB=OFF -DBUILD_JAVA=OFF -DBUILD_PYTHON=OFF \
1817
-DBUILD_HASKELL=OFF -DWITH_OPENSSL=OFF -DWITH_LIBEVENT=OFF -DWITH_ZLIB=OFF \
1918
-DWITH_QT5=OFF
2019
cmake --build . --target install
20+
popd

0 commit comments

Comments
 (0)