Skip to content
Snippets Groups Projects
Commit 1f8d23f1 authored by Ned Coltman's avatar Ned Coltman
Browse files

[bin][installscript][writer] remove ".git" with endswith check rather than rstrip

parent 0ea88f86
No related branches found
No related tags found
1 merge request!3359remove ".git" with endswidth check rather than rstrip
Pipeline #25488 passed
+2
...@@ -208,7 +208,9 @@ class InstallScriptWriterPython(InstallScriptWriterInterface): ...@@ -208,7 +208,9 @@ class InstallScriptWriterPython(InstallScriptWriterInterface):
def installModule(subFolder, url, branch, revision): def installModule(subFolder, url, branch, revision):
targetFolder = url.rstrip(".git").split("/")[-1] targetFolder = url.split("/")[-1]
if targetFolder.endswith(".git"):
targetFolder = targetFolder[:-4]
if not os.path.exists(targetFolder): if not os.path.exists(targetFolder):
runFromSubFolder(['git', 'clone', url, targetFolder], '.') runFromSubFolder(['git', 'clone', url, targetFolder], '.')
runFromSubFolder(['git', 'checkout', branch], subFolder) runFromSubFolder(['git', 'checkout', branch], subFolder)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment