Skip to content
Snippets Groups Projects
Commit 795fc483 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

get remote - check string not a regex

parent eeba9a05
No related branches found
No related tags found
1 merge request!62V2.0
...@@ -271,7 +271,7 @@ class vcs implements iVcs { ...@@ -271,7 +271,7 @@ class vcs implements iVcs {
// if a subdir .git exists: // if a subdir .git exists:
// Verify if git remote -v contains the current git url // Verify if git remote -v contains the current git url
// If not, we delete it // If not, we delete it
$sPreCmd='cd "' . $sWorkdir . '" 2>&1 && git remote -v 2>&1 | grep "' . $sGitUrl . '" >/dev/null || ( echo "DELETING .git dir..."; rm -rf .git && rc=$?; echo "rc=$rc"; sleep 1; exit $rc) '; $sPreCmd='cd "' . $sWorkdir . '" 2>&1 && git remote -v 2>&1 | grep -F "' . $sGitUrl . '" >/dev/null || ( echo "DELETING .git dir..."; rm -rf .git && rc=$?; echo "rc=$rc"; sleep 1; exit $rc) ';
$this->log(__FUNCTION__." - start PRE command <code>$sPreCmd</code>"); $this->log(__FUNCTION__." - start PRE command <code>$sPreCmd</code>");
exec($sPreCmd, $aPreLines, $iRc); exec($sPreCmd, $aPreLines, $iRc);
if (!$iRc==0){ if (!$iRc==0){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment