mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix cache clearing
This commit is contained in:
parent
da5ee15b40
commit
078becb0b7
@ -266,6 +266,14 @@ if ($path_to_config) {
|
||||
$config = Config::getConfigForPath($current_dir, $current_dir, $output_format);
|
||||
}
|
||||
|
||||
if (isset($options['clear-cache'])) {
|
||||
$cache_directory = $config->getCacheDirectory();
|
||||
|
||||
Config::removeCacheDirectory($cache_directory);
|
||||
echo 'Cache directory deleted' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
|
||||
$project_checker = new ProjectChecker(
|
||||
$config,
|
||||
new Psalm\Provider\FileProvider(),
|
||||
@ -282,14 +290,6 @@ if ($find_dead_code || $find_references_to !== null) {
|
||||
$project_checker->getCodebase()->collectReferences();
|
||||
}
|
||||
|
||||
if (isset($options['clear-cache'])) {
|
||||
$cache_directory = Config::getInstance()->getCacheDirectory();
|
||||
|
||||
Config::removeCacheDirectory($cache_directory);
|
||||
echo 'Cache directory deleted' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
|
||||
/** @var string $plugin_path */
|
||||
foreach ($plugins as $plugin_path) {
|
||||
Config::getInstance()->addPluginPath($current_dir . DIRECTORY_SEPARATOR . $plugin_path);
|
||||
|
Loading…
Reference in New Issue
Block a user