Skip to content

Commit

Permalink
fix: use shlex.join for command formatting in run function
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Dec 12, 2024
1 parent 6f05a35 commit 04656a7
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 04656a7

Please sign in to comment.