Skip to content

Commit

Permalink
Plugin // add check for Cache folder to be enabled (created).
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrico authored Nov 4, 2021
1 parent e01829a commit 026fe59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ public function activate(Composer $composer, IOInterface $io)
$config = $composer->getConfig();
$cache = new Cache($io, $composer->getConfig()->get('cache-dir') . '/translations');

if (!$cache->isEnabled()) {
$this->io->error("Composer Cache folder is not enabled.");

return false;
}

$this->filesystem = new Filesystem();

/** @var PluginConfiguration pluginConfig */
Expand Down

0 comments on commit 026fe59

Please sign in to comment.