Permalink
Browse files

Bug #18130 - fix execution on Windows

  • Loading branch information...
1 parent e231dd7 commit 8a5a1174c7c986cf757a78e910233418db6a639d @mrook mrook committed Nov 17, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 SVN/Command.php
View
@@ -474,14 +474,14 @@ public function run($args = array(), $switches = array())
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$cmd = str_replace(
$this->binaryPath,
- escapeshellarg($this->binaryPath),
+ escapeshellarg(str_replace('/', '\\', $this->binaryPath)),
$cmd
);
if (!$this->passthru) {
- exec("$cmd 2>&1", $out, $returnVar);
+ exec("cmd /c \"$cmd 2>&1\"", $out, $returnVar);
} else {
- passthru("$cmd 2>&1", $returnVar);
+ passthru("cmd /c \"$cmd 2>&1\"", $returnVar);
}
} else {
if ($this->useEscapeshellcmd) {

0 comments on commit 8a5a117

Please sign in to comment.