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
Branches
No related tags found
1 merge request!62V2.0
......@@ -271,7 +271,7 @@ class vcs implements iVcs {
// if a subdir .git exists:
// Verify if git remote -v contains the current git url
// 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>");
exec($sPreCmd, $aPreLines, $iRc);
if (!$iRc==0){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment