mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Run post hook regardless of error code
Summary: In order to support more flexible post hooks. Also send the error code to the hook for use by client code. Test Plan: None Reviewed By: epriestley Reviewers: epriestley CC: dpepper, aran, epriestley Differential Revision: 656
This commit is contained in:
parent
3453fd73f9
commit
7490da8139
2 changed files with 3 additions and 4 deletions
|
@ -303,9 +303,7 @@ try {
|
|||
$config->willRunWorkflow($command, $workflow);
|
||||
$workflow->willRunWorkflow();
|
||||
$err = $workflow->run();
|
||||
if ($err == 0) {
|
||||
$config->didRunWorkflow($command, $workflow);
|
||||
}
|
||||
$config->didRunWorkflow($command, $workflow, $err);
|
||||
exit($err);
|
||||
|
||||
} catch (ArcanistUsageException $ex) {
|
||||
|
|
|
@ -103,7 +103,8 @@ class ArcanistConfiguration {
|
|||
// This is a hook.
|
||||
}
|
||||
|
||||
public function didRunWorkflow($command, ArcanistBaseWorkflow $workflow) {
|
||||
public function didRunWorkflow($command, ArcanistBaseWorkflow $workflow,
|
||||
$err) {
|
||||
// This is a hook.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue