Skip to content

Commit

Permalink
Create composer binary directory if it not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-muehle committed Nov 28, 2016
1 parent ca44d13 commit cecd4a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Script/Helper/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function remove($file)
* @return bool
* @SuppressWarnings(PHPMD.StaticAccess)
*/
private function createDirectory($filename)
public function createDirectory($filename)
{
$directory = dirname($filename);

Expand Down
9 changes: 6 additions & 3 deletions src/Script/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit cecd4a3

Please sign in to comment.