mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +01:00
Don't bail on no effect exception
Summary: The main reason for this is to not exit with 1 when no paths are lintable (which is more success than failure). Test Plan: Returned empty array from `buildLinters()`, then: $ arc lint $ echo $? # 0 Reviewers: epriestley Reviewed By: epriestley CC: wez, aran, Korvin Differential Revision: https://secure.phabricator.com/D4625
This commit is contained in:
parent
aec212069e
commit
e56f47aed5
2 changed files with 5 additions and 2 deletions
|
@ -263,6 +263,9 @@ try {
|
||||||
$config->didRunWorkflow($command, $workflow, $err);
|
$config->didRunWorkflow($command, $workflow, $err);
|
||||||
exit((int)$err);
|
exit((int)$err);
|
||||||
|
|
||||||
|
} catch (ArcanistNoEffectException $ex) {
|
||||||
|
echo $ex->getMessage()."\n";
|
||||||
|
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
$is_usage = ($ex instanceof ArcanistUsageException);
|
$is_usage = ($ex instanceof ArcanistUsageException);
|
||||||
if ($is_usage) {
|
if ($is_usage) {
|
||||||
|
|
|
@ -1336,7 +1336,7 @@ EOTEXT
|
||||||
} catch (ArcanistNoEngineException $ex) {
|
} catch (ArcanistNoEngineException $ex) {
|
||||||
$this->console->writeOut("No lint engine configured for this project.\n");
|
$this->console->writeOut("No lint engine configured for this project.\n");
|
||||||
} catch (ArcanistNoEffectException $ex) {
|
} catch (ArcanistNoEffectException $ex) {
|
||||||
$this->console->writeOut("No paths to lint.\n");
|
$this->console->writeOut($ex->getMessage()."\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -1411,7 +1411,7 @@ EOTEXT
|
||||||
$this->console->writeOut(
|
$this->console->writeOut(
|
||||||
"No unit test engine is configured for this project.\n");
|
"No unit test engine is configured for this project.\n");
|
||||||
} catch (ArcanistNoEffectException $ex) {
|
} catch (ArcanistNoEffectException $ex) {
|
||||||
$this->console->writeOut("No tests to run.\n");
|
$this->console->writeOut($ex->getMessage()."\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue