MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / execute

Function execute

build.py:24–34  ·  view source on GitHub ↗
(cmd: str, cwd: Optional[str] = None)

Source from the content-addressed store, hash-verified

22
23
24def execute(cmd: str, cwd: Optional[str] = None):
25 popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
26 shell=True, text=True, cwd=cwd)
27 for stdout_line in iter(popen.stdout.readline, ""):
28 sys.stdout.write(stdout_line)
29 sys.stdout.flush()
30
31 popen.stdout.close()
32 return_code = popen.wait()
33 if return_code:
34 raise subprocess.CalledProcessError(return_code, cmd)
35
36
37def ensure_spidermonkey():

Callers 3

ensure_spidermonkeyFunction · 0.70
run_cmake_buildFunction · 0.70
copy_artifactsFunction · 0.70

Calls 2

writeMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected