MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / RunShellCmd

Function RunShellCmd

scripts/android.py:35–45  ·  view source on GitHub ↗
(command, start_dir = PROJECT_SRC_DIR, env=None, verbose=False)

Source from the content-addressed store, hash-verified

33# Runs a command in a directory and returns its return code.
34# Directory is project root by default, or a relative path from project root
35def RunShellCmd(command, start_dir = PROJECT_SRC_DIR, env=None, verbose=False):
36 # Flush stdout here. Helps when debugging on CI.
37 sys.stdout.flush()
38
39 if start_dir != PROJECT_SRC_DIR:
40 start_dir = RepoRelative(start_dir)
41 cmd_list = command.split(" ")
42
43 if verbose:
44 print(f'CICMD({cmd_list}, env={env})')
45 subprocess.check_call(cmd_list, cwd=start_dir, env=env)
46
47def main():
48 configs = ['Release', 'Debug']

Callers 1

mainFunction · 0.70

Calls 1

RepoRelativeFunction · 0.70

Tested by

no test coverage detected