Permalink
Browse files

Protocol changes from http:// to git://

Removed lowercase conversion
Added a file_exists() check for rm
  • Loading branch information...
1 parent bd36dfc commit 8815ce6d3c83c60b1b824167736700931ec7e70a @rauchg committed May 18, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 apps/frontend/modules/plugin/lib/PluginAddStep4Form.class.php
  2. +1 −1 lib/GitRepository.class.php
@@ -30,7 +30,7 @@ public function configure(){
public function doValidate($validator, $values){
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();
$this->gitRepositoryPath = $git->getPath();
@@ -44,7 +44,7 @@ public function checkout(){
}
public function update(){
- exec(escapeshellcmd('rm -rf ' . $this->getPath()));
+ if (file_exists($this->getPath())) exec(escapeshellcmd('rm -rf ' . $this->getPath()));
return $this->checkout();
}

0 comments on commit 8815ce6

Please sign in to comment.