MCPcopy Create free account
hub / github.com/ComfyWorkflows/ComfyUI-Launcher / run_command

Function run_command

server/utils.py:103–112  ·  view source on GitHub ↗
(cmd: List[str], cwd: Optional[str] = None, bg: bool = False)

Source from the content-addressed store, hash-verified

101 process.stdout.close()
102
103def run_command(cmd: List[str], cwd: Optional[str] = None, bg: bool = False) -> None:
104 process = subprocess.Popen(" ".join(cmd), cwd=cwd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
105
106 if bg:
107 # Create a separate thread to handle the printing of the process's output
108 threading.Thread(target=print_process_output, args=(process,), daemon=True).start()
109 return process.pid
110 else:
111 print_process_output(process)
112 assert process.wait() == 0
113
114def get_ckpt_names_with_node_info(workflow_json: Union[Dict, List], is_windows: bool) -> List[ModelFileWithNodeInfo]:
115 ckpt_names = []

Callers 8

create_comfyui_projectFunction · 0.90
create_symlinkFunction · 0.85
create_virtualenvFunction · 0.85

Calls 1

print_process_outputFunction · 0.85

Tested by

no test coverage detected