mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-11 16:16:13 +01:00
When "ArcanistRuntime" exits with a nonzero exit code, emit that exit code
Summary: See <https://discourse.phabricator-community.org/t/failed-arc-patch-does-not-return-non-zero-exit-code/3584>. Returning an integer from a top-level PHP file doesn't actually affect the process exit code, as much as I might wish it does. Test Plan: Ran `arc patch adflsnadfsln; echo $?`, saw a nonzero exit code after this fix. Differential Revision: https://secure.phabricator.com/D21037
This commit is contained in:
parent
1b97f8b408
commit
5451d28752
3 changed files with 5 additions and 3 deletions
2
bin/arc
2
bin/arc
|
@ -7,4 +7,4 @@ if (function_exists('pcntl_async_signals')) {
|
|||
declare(ticks = 1);
|
||||
}
|
||||
|
||||
return require_once dirname(__DIR__).'/support/init/init-arcanist.php';
|
||||
require_once dirname(__DIR__).'/support/init/init-arcanist.php';
|
||||
|
|
|
@ -7,4 +7,4 @@ if (function_exists('pcntl_async_signals')) {
|
|||
declare(ticks = 1);
|
||||
}
|
||||
|
||||
return require_once dirname(__DIR__).'/support/init/init-arcanist.php';
|
||||
require_once dirname(__DIR__).'/support/init/init-arcanist.php';
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
require_once dirname(__FILE__).'/init-script.php';
|
||||
|
||||
$runtime = new ArcanistRuntime();
|
||||
return $runtime->execute($argv);
|
||||
$err = $runtime->execute($argv);
|
||||
|
||||
exit($err);
|
||||
|
|
Loading…
Reference in a new issue