From 8ffba323ea4aeb2b4f4c8e9f0a91a96845a481a1 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 11 Apr 2011 16:13:22 -0700 Subject: [PATCH] Stop this from failing on directories, etc.; u-u-u-u-ultra clown. --- src/lint/engine/base/ArcanistLintEngine.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lint/engine/base/ArcanistLintEngine.php b/src/lint/engine/base/ArcanistLintEngine.php index 35b4fe2a..472d4350 100644 --- a/src/lint/engine/base/ArcanistLintEngine.php +++ b/src/lint/engine/base/ArcanistLintEngine.php @@ -181,8 +181,14 @@ abstract class ArcanistLintEngine { // raised an error about its filename. We could refine this by looking // through the lint messages and doing this load only if any of them // have original/replacement text or something like that. - $this->fileData[$path] = Filesystem::readFile($path); - $result->setData($this->fileData[$path]); + try { + $this->fileData[$path] = Filesystem::readFile($path); + $result->setData($this->fileData[$path]); + } catch (FilesystemException $ex) { + // Ignore this, it's noncritical that we access this data and it + // might be unreadable or a directory or whatever else for plenty + // of legitimate reasons. + } } } -- 2.43.0