]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Exit with an error code if the workflow returned one.
authorAlan Huang <alanh@dev3174.snc6.facebook.com>
Wed, 13 Jun 2012 23:01:29 +0000 (16:01 -0700)
committerAlan Huang <alanh@dev3174.snc6.facebook.com>
Wed, 13 Jun 2012 23:33:37 +0000 (16:33 -0700)
Summary:
PHP thinks this thing is an integer... and also thinks it's not an
integer... I'm so confused... Anyway, this seems to persuade it to
use the correct overload.

Test Plan:
Ran arc patch with the incant provided in the bug report. It
successfully returned 1, where it didn't before. I didn't test the
perflab stuff; hopefully that aborts when it detects nonzero return.

Reviewers: nh

Reviewed By: nh

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D2743

scripts/arcanist.php

index d97151535d219bdd741e7e4aaffae5f1d7a3b81f..88344341fea86dba0084ec633bcbe01ef7f2be90 100755 (executable)
@@ -288,7 +288,7 @@ try {
   $workflow->willRunWorkflow();
   $err = $workflow->run();
   $config->didRunWorkflow($command, $workflow, $err);
-  exit($err);
+  exit((int)$err);
 
 } catch (ArcanistUsageException $ex) {
   echo phutil_console_format(