mirror of
https://github.com/daylinmorgan/git-server.git
synced 2025-02-22 23:15:50 -06:00
use shlex quote
This commit is contained in:
parent
21f5074303
commit
558b10f442
1 changed files with 3 additions and 3 deletions
|
@ -74,14 +74,14 @@ def get_gh_repos() -> List[Repo]:
|
||||||
def mirror_repo(repo: Repo, dry_run=False) -> None:
|
def mirror_repo(repo: Repo, dry_run=False) -> None:
|
||||||
print(f"mirroring: {repo.name}")
|
print(f"mirroring: {repo.name}")
|
||||||
cmd = [
|
cmd = [
|
||||||
*shlex.split("ssh -p 23231 localhost repos import --mirror"),
|
*shlex.split("ssh -p 23231 localhost -- repos import"),
|
||||||
|
|
||||||
repo.name,
|
repo.name,
|
||||||
repo.html_url,
|
repo.html_url,
|
||||||
|
"--mirror",
|
||||||
]
|
]
|
||||||
if repo.description != "":
|
if repo.description != "":
|
||||||
cmd.append("-d")
|
cmd.append("-d")
|
||||||
cmd.append(f"'{repo.description}'")
|
cmd.append(shlex.quote(repo.description))
|
||||||
if dry_run:
|
if dry_run:
|
||||||
print(" ".join(str(s) for s in cmd))
|
print(" ".join(str(s) for s in cmd))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue