1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +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); $config->willRunWorkflow($command, $workflow);
$workflow->willRunWorkflow(); $workflow->willRunWorkflow();
$err = $workflow->run(); $err = $workflow->run();
if ($err == 0) { $config->didRunWorkflow($command, $workflow, $err);
$config->didRunWorkflow($command, $workflow);
}
exit($err); exit($err);
} catch (ArcanistUsageException $ex) { } catch (ArcanistUsageException $ex) {

View file

@ -103,7 +103,8 @@ class ArcanistConfiguration {
// This is a hook. // This is a hook.
} }
public function didRunWorkflow($command, ArcanistBaseWorkflow $workflow) { public function didRunWorkflow($command, ArcanistBaseWorkflow $workflow,
$err) {
// This is a hook. // This is a hook.
} }