Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
clean up target dir after successful source installation - not before it
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Heleniak committed Sep 1, 2012
1 parent 4025100 commit f201cb9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rg/broker/commands/AddRepository.php
Expand Up @@ -57,12 +57,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {
mkdir($cacheDir, 0777, true);
}

if (file_exists($targetDir)) {
$processExecutor->execute('rm -rf ' . $targetDir);
}
mkdir($targetDir, 0777, true);
mkdir($targetDir . '/dists');

putenv('COMPOSER_VENDOR_DIR=' . $cacheDir);
putenv('COMPOSER_BIN_DIR=' . $cacheDir . '/bin');

Expand All @@ -80,6 +74,12 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$installer->setUpdate(true);
$installer->run();

if (file_exists($targetDir)) {
$processExecutor->execute('rm -rf ' . $targetDir);
}
mkdir($targetDir, 0777, true);
mkdir($targetDir . '/dists');

$packages = array('packages' => array());
$dumper = new \Composer\Package\Dumper\ArrayDumper();

Expand Down

0 comments on commit f201cb9

Please sign in to comment.