From a62307250f883dd7bb7f24a88753122d9cc0ae57 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Mon, 12 May 2014 18:57:55 +0100 Subject: [PATCH] Fix the git plugin merge command, see #326 --- PHPCI/Plugin/Git.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PHPCI/Plugin/Git.php b/PHPCI/Plugin/Git.php index cdd115ce..4fe6f530 100644 --- a/PHPCI/Plugin/Git.php +++ b/PHPCI/Plugin/Git.php @@ -80,8 +80,9 @@ class Git implements \PHPCI\Plugin protected function runMergeAction($options) { if (array_key_exists('branch', $options)) { - $cmd = 'git checkout %s && git merge ' . $this->build->getBranch(); - return $this->phpci->executeCommand($cmd, $this->directory, $options['branch']); + $cmd = 'cd "%s" && git checkout %s && git merge "%s"'; + $path = $this->phpci->buildPath; + return $this->phpci->executeCommand($cmd, $path, $options['branch'], $this->build->getBranch()); } }