Skip to content

Commit

Permalink
Protocol changes from http:// to git://
Browse files Browse the repository at this point in the history
Removed lowercase conversion
Added a file_exists() check for rm
  • Loading branch information
rauchg committed May 18, 2010
1 parent bd36dfc commit 8815ce6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -30,7 +30,7 @@ public function configure(){


public function doValidate($validator, $values){ public function doValidate($validator, $values){
try { try {
$git = new GitRepository(sprintf('http://github.com/%s/%s.git', strtolower($values['user']), strtolower($values['repository'])), sfConfig::get('app_git_storage_path'), sfConfig::get('app_git_command')); $git = new GitRepository(sprintf('git://github.com/%s/%s.git', $values['user'], $values['repository']), sfConfig::get('app_git_storage_path'), sfConfig::get('app_git_command'));
$git->fetch(); $git->fetch();


$this->gitRepositoryPath = $git->getPath(); $this->gitRepositoryPath = $git->getPath();
Expand Down
2 changes: 1 addition & 1 deletion lib/GitRepository.class.php
Expand Up @@ -44,7 +44,7 @@ public function checkout(){
} }


public function update(){ public function update(){
exec(escapeshellcmd('rm -rf ' . $this->getPath())); if (file_exists($this->getPath())) exec(escapeshellcmd('rm -rf ' . $this->getPath()));
return $this->checkout(); return $this->checkout();
} }


Expand Down

0 comments on commit 8815ce6

Please sign in to comment.