Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pear/VersionControl_SVN
Browse files Browse the repository at this point in the history
  • Loading branch information
mrook committed Oct 5, 2012
2 parents f2dbd0f + 55d477f commit 85a361e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions SVN/Command.php
Expand Up @@ -435,9 +435,10 @@ public function checkCommandRequirements()
public function run($args = array(), $switches = array())
{
if (!file_exists($this->binaryPath)) {
$this->binaryPath = System::which('svn');
$system = new System();
$this->binaryPath = $system->which('svn');
}

if (sizeof($switches) > 0) {
$this->switches = $switches;
}
Expand All @@ -446,14 +447,14 @@ public function run($args = array(), $switches = array())
$this->args[$k] = escapeshellarg($args[$k]);
}
}

// Always prepare, allows for obj re-use. (Request #5021)
$this->prepare();

$out = array();
// @var integer $returnVar Return number from shell execution.
$returnVar = null;

$cmd = $this->preparedCmd;

// On Windows, don't use escapeshellcmd, and double-quote $cmd
Expand All @@ -465,7 +466,7 @@ public function run($args = array(), $switches = array())
escapeshellarg($this->binaryPath),
$cmd
);

if (!$this->passthru) {
exec("$cmd 2>&1", $out, $returnVar);
} else {
Expand Down

0 comments on commit 85a361e

Please sign in to comment.