MCPcopy Create free account
hub / github.com/apache/kvrocks / run

Function run

x.py:60–73  ·  view source on GitHub ↗
(*args: str, msg: Optional[str] = None, verbose: bool = False, **kwargs: Any)

Source from the content-addressed store, hash-verified

58
59# NOTE: the return type should be Popen[str], but Popen is not subscriptable before python 3.9
60def run(*args: str, msg: Optional[str] = None, verbose: bool = False, **kwargs: Any) -> Popen:
61 sys.stdout.flush()
62 if verbose:
63 print(f"$ {' '.join(args)}")
64
65 p = Popen(args, **kwargs)
66 code = p.wait()
67 if code != 0:
68 err = f"\nfailed to run: {args}\nexit with code: {code}\n"
69 if msg:
70 err += f"error message: {msg}\n"
71 raise RuntimeError(err)
72
73 return p
74
75
76def run_pipe(*args: str, msg: Optional[str] = None, verbose: bool = False, **kwargs: Any) -> IO[str]:

Callers 10

run_pipeFunction · 0.85
buildFunction · 0.85
clang_formatFunction · 0.85
clang_tidyFunction · 0.85
download_packageFunction · 0.85
golangci_lintFunction · 0.85
package_sourceFunction · 0.85
test_cppFunction · 0.85
test_goFunction · 0.85
StartMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_cppFunction · 0.68
test_goFunction · 0.68