From 1e8e6c13db863c87e31ffcfe9215e63b2519a84f Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Wed, 10 May 2017 12:08:22 +0200
Subject: [PATCH] CI Webgui: fix vcs.git class: remove ending "&&" in shell
 command

---
 public_html/deployment/classes/vcs.git.class.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/public_html/deployment/classes/vcs.git.class.php b/public_html/deployment/classes/vcs.git.class.php
index 6ebef597..7012be83 100644
--- a/public_html/deployment/classes/vcs.git.class.php
+++ b/public_html/deployment/classes/vcs.git.class.php
@@ -94,9 +94,9 @@ class vcs implements iVcs {
         $this->_aCfg = $aRepoConfig;
 
         // define temp dir
-        $this->_setTempdir();
         $this->_sKeyfile = $this->_aCfg["dataDir"] . "/sshkeys/" . $this->_aCfg["auth"];
         $this->_sWrapper = $this->_aCfg["appRootDir"] . "/shellscripts/gitsshwrapper.sh";
+        $this->_setTempdir();
 
         return $this->_aCfg = $aRepoConfig;
     }
@@ -111,7 +111,7 @@ class vcs implements iVcs {
             $sGitCmd = 'export GIT_SSH="' . $this->_sWrapper . '" ; export PKEY="' . $this->_sKeyfile . '" ; ';
             $sGitCmd.='mkdir -p "' . $this->_sTempDir . '" && cd "' . $this->_sTempDir . '" && ';
             $sGitCmd.='git init >/dev/null && ';
-            $sGitCmd.='git remote add origin "' . $this->getUrl() . '" 2>&1 && ';
+            $sGitCmd.='git remote add origin "' . $this->getUrl() . '" 2>&1 ';
             // $sGitCmd='time ('.$sGitCmd.')';
             exec($sGitCmd, $aOutput, $iRc);
         }
-- 
GitLab