mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-23 14:00:55 +01:00
Don't blast if cache couldn't be saved
Summary: It is currently causing us some pain because we use libraries in read-only directories. Not saving the cache is still pretty bad because analysis is quite slow. But it is better than exploding. I considered other solutions like not .gitignoring the cache file but it would require committing it with each and every change. I plan to resolve the note https://secure.phabricator.com/diffusion/ARC/browse/master/src/lint/linter/ArcanistPhutilLibraryLinter.php;d93bb5abd4935bc8$56-59 in longer term. Test Plan: `arc liberate` without writable cache. Reviewers: epriestley, nh Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2734
This commit is contained in:
parent
d93bb5abd4
commit
a6a4b1ebbc
1 changed files with 5 additions and 1 deletions
|
@ -407,7 +407,11 @@ final class PhutilLibraryMapBuilder {
|
|||
}
|
||||
|
||||
$json = json_encode($cache);
|
||||
Filesystem::writeFile($cache_file, $json);
|
||||
try {
|
||||
Filesystem::writeFile($cache_file, $json);
|
||||
} catch (FilesystemException $ex) {
|
||||
$this->log("Unable to save the cache!\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue