[152368] contrib/mp-buildbot/mpbb
larryv at macports.org
larryv at macports.org
Mon Sep 5 11:37:15 PDT 2016
Revision: 152368
https://trac.macports.org/changeset/152368
Author: larryv at macports.org
Date: 2016-09-05 11:37:15 -0700 (Mon, 05 Sep 2016)
Log Message:
-----------
mpbb: Preserve subcommand return code on exit
Modified Paths:
--------------
contrib/mp-buildbot/mpbb
Modified: contrib/mp-buildbot/mpbb
===================================================================
--- contrib/mp-buildbot/mpbb 2016-09-05 18:37:13 UTC (rev 152367)
+++ contrib/mp-buildbot/mpbb 2016-09-05 18:37:15 UTC (rev 152368)
@@ -186,9 +186,15 @@
if [[ $option_help -eq 1 ]]; then
usage
fi
+
## Otherwise, run the command and deal with errors
-export PORTSRC="${option_work_dir}/macports.conf"
-if ! $command "$@"; then
- err "Failed to run $command"
- exit 1
-fi
+PORTSRC=${option_work_dir}/macports.conf "$command" "$@"
+readonly rc=$?
+case $rc in
+ 0)
+ ;;
+ *)
+ err "\`$command' failed to run successfully"
+ ;;
+esac
+exit $rc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160905/d94ad443/attachment.html>
More information about the macports-changes
mailing list