MCPcopy Create free account
hub / github.com/6174/comflowyspace / checkIfInstalled

Function checkIfInstalled

apps/node/src/modules/comfyui/bootstrap.ts:96–110  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

94
95// 检查一个程序是否已经安装
96export async function checkIfInstalled(name: string): Promise<boolean> {
97 const { PIP_PATH, PYTHON_PATH } = conda.getCondaPaths();
98
99 try {
100 if (name === "python") {
101 await runCommand(`${PYTHON_PATH} --version`);
102 } else {
103 await runCommand(name);
104 }
105 return true;
106 } catch(err) {
107 logger.info("check install error", err);
108 return false;
109 }
110}
111
112/**
113 * Install Conda

Callers 5

gitCloneInstallFunction · 0.90
ApiBootstrapFunction · 0.90
checkBasicRequirementsFunction · 0.85
installCondaTaskFunction · 0.85
installPythonTaskFunction · 0.85

Calls 2

runCommandFunction · 0.90
getCondaPathsMethod · 0.80

Tested by

no test coverage detected