MCPcopy
hub / github.com/dqzboy/Docker-Proxy / needsInit

Function needsInit

hubcmdui/scripts/auto-setup.js:31–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29
30// 检查是否需要初始化数据库
31async function needsInit() {
32 const dataDir = path.join(process.cwd(), 'data');
33
34 // 如果data目录不存在,需要初始化
35 if (!fs.existsSync(dataDir)) {
36 return true;
37 }
38
39 // 使用专门的数据库检查器
40 const isReady = await isDatabaseReady();
41 return !isReady;
42}
43
44// 执行命令并显示输出
45function runCommand(command, description) {

Callers 1

autoSetupFunction · 0.85

Calls 1

isDatabaseReadyFunction · 0.85

Tested by

no test coverage detected