Skip to content

Commit

Permalink
Merge pull request #305 from trim21/log-cmd-as-shell-quoted
Browse files Browse the repository at this point in the history
fix: use `shlex.join` for command formatting in run function
  • Loading branch information
mergify[bot] authored Dec 12, 2024
2 parents 6f05a35 + 04656a7 commit 2f7610a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nix_update/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import shlex
import subprocess
import sys
from collections.abc import Callable
Expand Down Expand Up @@ -31,7 +32,7 @@ def run(
check: bool = True,
extra_env: dict[str, str] = {},
) -> "subprocess.CompletedProcess[str]":
info("$ " + " ".join(command))
info("$ " + shlex.join(command))
env = os.environ.copy()
env.update(extra_env)
return subprocess.run(
Expand Down

0 comments on commit 2f7610a

Please sign in to comment.