diff --git a/src/Script/Helper/Filesystem.php b/src/Script/Helper/Filesystem.php index 803bb75..820b786 100644 --- a/src/Script/Helper/Filesystem.php +++ b/src/Script/Helper/Filesystem.php @@ -98,7 +98,7 @@ public function remove($file) * @return bool * @SuppressWarnings(PHPMD.StaticAccess) */ - private function createDirectory($filename) + public function createDirectory($filename) { $directory = dirname($filename); diff --git a/src/Script/Processor.php b/src/Script/Processor.php index d862c01..45a0064 100644 --- a/src/Script/Processor.php +++ b/src/Script/Processor.php @@ -49,10 +49,13 @@ public function __construct(IOInterface $io, Helper $helper, Configuration $conf */ public function cleanUp() { - $this->removeFromDir( - $this->configuration->getComposerBinDirectory() - ); + $composerBinDirectory = $this->configuration->getComposerBinDirectory(); + + if (false === is_dir($composerBinDirectory)) { + $this->helper->getFilesystem()->createDirectory($composerBinDirectory); + } + $this->removeFromDir($composerBinDirectory); $this->removeFromDir( $this->configuration->getBinDirectory(), array_keys($this->configuration->getTools())