From 410e53da0b71e85e05568f1587f197f28b845ca4 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 24 Feb 2017 13:00:42 +0700 Subject: [PATCH] Fixes issue with branches that start with a hash --- src/PHPCensor/Model/Build/RemoteGitBuild.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PHPCensor/Model/Build/RemoteGitBuild.php b/src/PHPCensor/Model/Build/RemoteGitBuild.php index 780e929a..76191363 100644 --- a/src/PHPCensor/Model/Build/RemoteGitBuild.php +++ b/src/PHPCensor/Model/Build/RemoteGitBuild.php @@ -54,7 +54,7 @@ class RemoteGitBuild extends Build $cmd .= ' --depth ' . intval($depth) . ' '; } - $cmd .= ' -b %s %s "%s"'; + $cmd .= ' -b "%s" "%s" "%s"'; $success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo); if ($success) { @@ -81,7 +81,7 @@ class RemoteGitBuild extends Build $cmd .= ' --depth ' . intval($depth) . ' '; } - $cmd .= ' -b %s %s "%s"'; + $cmd .= ' -b "%s" "%s" "%s"'; $cmd = 'export GIT_SSH="'.$gitSshWrapper.'" && ' . $cmd; $success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);