MCPcopy Create free account
hub / github.com/anyoptimization/pymoo / run_command

Function run_command

docs/cli.py:157–168  ·  view source on GitHub ↗

Run a shell command and stream output to console.

(cmd, cwd=None, check=True)

Source from the content-addressed store, hash-verified

155
156
157def run_command(cmd, cwd=None, check=True):
158 """Run a shell command and stream output to console."""
159 if isinstance(cmd, str):
160 cmd = cmd.split()
161 print(f"$ {' '.join(cmd)}")
162
163 result = subprocess.run(cmd, cwd=cwd, check=False)
164
165 if check and result.returncode != 0:
166 sys.exit(result.returncode)
167
168 return result
169
170
171def jcache(args, check=True):

Callers 4

install_pymooFunction · 0.85
compile_notebooksFunction · 0.85
exec_singleFunction · 0.85
serve_docsFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…