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:
parent
3453fd73f9
commit
7490da8139
2 changed files with 3 additions and 4 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue