mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-02 09:19:40 +00:00
Don't exit prebuild script on nonzero exit code when we already check it
We have `set -e` enabled, so normally exit the script if a command fails. We also had explicit exit code checks in a few places with user-friendly error messages. These were never printed as the script exited before we could check the exit code due to a bad exit code.
This commit is contained in:
parent
87dba1fcfc
commit
a6493ce329
1 changed files with 15 additions and 10 deletions
|
@ -213,8 +213,8 @@ run_cmd() {
|
|||
shift
|
||||
|
||||
if [ -z $VERBOSE ]; then
|
||||
eval $CMD $@ > output.log 2>&1
|
||||
RET=$?
|
||||
RET=0
|
||||
eval $CMD $@ > output.log 2>&1 || RET=$?
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
if [ -z $APPVEYOR ]; then
|
||||
|
@ -230,8 +230,9 @@ run_cmd() {
|
|||
|
||||
return $RET
|
||||
else
|
||||
eval $CMD $@
|
||||
return $?
|
||||
RET=0
|
||||
eval $CMD $@ || RET=$?
|
||||
return RET
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -256,15 +257,16 @@ download() {
|
|||
printf " Downloading $FILE... "
|
||||
|
||||
if [ -z $VERBOSE ]; then
|
||||
curl --silent --retry 10 -kLy 5 -o $FILE $URL
|
||||
RET=$?
|
||||
RET=0
|
||||
curl --silent --retry 10 -kLy 5 -o $FILE $URL || RET=$?
|
||||
else
|
||||
curl --retry 10 -kLy 5 -o $FILE $URL
|
||||
RET=$?
|
||||
RET=0
|
||||
curl --retry 10 -kLy 5 -o $FILE $URL || RET=$?
|
||||
fi
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
echo "Failed!"
|
||||
wrappedExit $RET
|
||||
else
|
||||
echo "Done."
|
||||
fi
|
||||
|
@ -997,8 +999,8 @@ if [ -z $VERBOSE ]; then
|
|||
else
|
||||
echo "- cmake .. $CMAKE_OPTS"
|
||||
fi
|
||||
run_cmd cmake .. $CMAKE_OPTS
|
||||
RET=$?
|
||||
RET=0
|
||||
run_cmd cmake .. $CMAKE_OPTS || RET=$?
|
||||
if [ -z $VERBOSE ]; then
|
||||
if [ $RET -eq 0 ]; then
|
||||
echo Done.
|
||||
|
@ -1006,6 +1008,9 @@ if [ -z $VERBOSE ]; then
|
|||
echo Failed.
|
||||
fi
|
||||
fi
|
||||
if [ $RET -ne 0 ]; then
|
||||
wrappedExit $RET
|
||||
fi
|
||||
|
||||
if [ -n $ACTIVATE_MSVC ]; then
|
||||
echo
|
||||
|
|
Loading…
Reference in a new issue