diff --git a/lib/config/redis.js b/lib/config/redis.js index be8caa9f..8b42cbb6 100644 --- a/lib/config/redis.js +++ b/lib/config/redis.js @@ -59,6 +59,10 @@ export class Redis { ] Bot.makeLog("info", ["正在启动", logger.cyan(cmd.join(" "))], "Redis") const redisProcess = spawn(cmd[0], cmd.slice(1)) + .on("error", err => { + Bot.makeLog("error", ["启动错误", err], "Redis") + redisProcess.exit = true + }) .on("exit", () => redisProcess.exit = true) redisProcess.stdout.on("data", data => { Bot.makeLog("info", Bot.String(data).trim(), "Redis")