1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 08:12:40 +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:
mgummelt 2011-07-12 14:34:27 -07:00
parent 3453fd73f9
commit 7490da8139
2 changed files with 3 additions and 4 deletions

View file

@ -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) {

View file

@ -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.
}