From 558b10f4429c575411a5ba5e95e97ee82cd5b471 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 30 Jan 2025 11:00:12 -0600 Subject: [PATCH] use shlex quote --- soft/add-mirrors | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soft/add-mirrors b/soft/add-mirrors index 846a3f7..7fe01fe 100755 --- a/soft/add-mirrors +++ b/soft/add-mirrors @@ -74,14 +74,14 @@ def get_gh_repos() -> List[Repo]: def mirror_repo(repo: Repo, dry_run=False) -> None: print(f"mirroring: {repo.name}") cmd = [ - *shlex.split("ssh -p 23231 localhost repos import --mirror"), - + *shlex.split("ssh -p 23231 localhost -- repos import"), repo.name, repo.html_url, + "--mirror", ] if repo.description != "": cmd.append("-d") - cmd.append(f"'{repo.description}'") + cmd.append(shlex.quote(repo.description)) if dry_run: print(" ".join(str(s) for s in cmd)) else: