1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +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:
vrana 2013-01-24 14:45:21 -08:00
parent aec212069e
commit e56f47aed5
2 changed files with 5 additions and 2 deletions

View file

@ -263,6 +263,9 @@ try {
$config->didRunWorkflow($command, $workflow, $err);
exit((int)$err);
} catch (ArcanistNoEffectException $ex) {
echo $ex->getMessage()."\n";
} catch (Exception $ex) {
$is_usage = ($ex instanceof ArcanistUsageException);
if ($is_usage) {

View file

@ -1336,7 +1336,7 @@ EOTEXT
} catch (ArcanistNoEngineException $ex) {
$this->console->writeOut("No lint engine configured for this project.\n");
} catch (ArcanistNoEffectException $ex) {
$this->console->writeOut("No paths to lint.\n");
$this->console->writeOut($ex->getMessage()."\n");
}
return null;
@ -1411,7 +1411,7 @@ EOTEXT
$this->console->writeOut(
"No unit test engine is configured for this project.\n");
} catch (ArcanistNoEffectException $ex) {
$this->console->writeOut("No tests to run.\n");
$this->console->writeOut($ex->getMessage()."\n");
}
return null;