MCPcopy Create free account
hub / github.com/ezyang/ghstack / log_command

Function log_command

src/ghstack/shell.py:20–29  ·  view source on GitHub ↗

Given a command, print it in a both machine and human readable way. Args: *args: the list of command line arguments you want to run env: the dictionary of environment variable settings for the command

(args: Sequence[str])

Source from the content-addressed store, hash-verified

18
19
20def log_command(args: Sequence[str]) -> None:
21 """
22 Given a command, print it in a both machine and human readable way.
23
24 Args:
25 *args: the list of command line arguments you want to run
26 env: the dictionary of environment variable settings for the command
27 """
28 cmd = " ".join(shlex.quote(arg) for arg in args)
29 logging.info("$ " + cmd)
30
31
32K = TypeVar("K")

Callers 1

shMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected