Skip to content
Snippets Groups Projects
Commit 88fa08b6 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Fix git clone without ssh

parent 804b243c
No related branches found
No related tags found
No related merge requests found
......@@ -27,13 +27,13 @@ class Update(Hook):
if os.path.isdir(os.path.join(self.ctx.path, ".git")):
return self.pull(**kwargs)
else:
console.print(f"Cloning {self.ctx.name} into '{self.ctx.path}' ...")
console.print(f"Cloning '{self.ctx.name}' into '{self.ctx.path}' ...")
return self.clone(**kwargs)
def clone(self, **kwargs):
r = None
exception = None
for url in [self.ssh_url, self.https_url]:
for url in [url for url in [self.ssh_url, self.https_url] if url is not None]:
args = [f"{url} {self.ctx.path}"]
if self.default_checkout_ref:
args.append(f" --branch {self.default_checkout_ref}")
......
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