mixxxdj / buildserver

Tools for managing the Mixxx build server and build VMs.
12 stars 23 forks source link

Mac: return non-zero status on errors from build_environment.sh #63

Open rryan opened 6 years ago

rryan commented 6 years ago

build_environment.sh can return 0 when an error occurred.

For example, if this tar invocation fails to find the file to untar.

rryan commented 6 years ago

Probably relevant: http://mywiki.wooledge.org/BashFAQ/105

rryan commented 6 years ago

My current hunch is that build_environment.sh is called as part of a pipeline, and only the last command in a pipeline returning an error triggers an exit.

scripts/macosx/build_environment.sh --dependency-cache ${RESOURCE_PATH} --name ${ENVIRONMENT_NAME} --macosx-sdk ${MACOSX_SDK} --macosx-target ${MACOSX_TARGET} ${ENABLE_ARCH} --macosx-stdlib libc++ 2>&1 | tee environment/${ENVIRONMENT_NAME}/build_environment.log

If we use set -o pipefail this should work around it.