Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
speed up process if repo exists
Browse files Browse the repository at this point in the history
  • Loading branch information
khepin committed Jul 24, 2012
1 parent 6c29307 commit 6053a52
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Khepin/Medusa/Command/AddRepoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ protected function execute(InputInterface $input, OutputInterface $output)

protected function getGitRepo($package, $outputDir)
{
$dir = $in_dir.'/'.$this->package.'.git';
if(is_dir($dir)){
$output->writeln(' <warning>The repo already exists. Try updating it instead.</warning>');
return;
}
$response = $this->guzzle->get('/packages/'.$package.'.json')->send();
$response = $response->getBody(true);
$package = json_decode($response);
Expand Down

0 comments on commit 6053a52

Please sign in to comment.