chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -332,7 +332,9 @@ export async function runGmailService(opts: GmailRunOptions) {
}, renewMs);
const shutdown = () => {
if (shuttingDown) return;
if (shuttingDown) {
return;
}
shuttingDown = true;
clearInterval(renewTimer);
child.kill("SIGTERM");
@@ -342,10 +344,14 @@ export async function runGmailService(opts: GmailRunOptions) {
process.on("SIGTERM", shutdown);
child.on("exit", () => {
if (shuttingDown) return;
if (shuttingDown) {
return;
}
defaultRuntime.log("gog watch serve exited; restarting in 2s");
setTimeout(() => {
if (shuttingDown) return;
if (shuttingDown) {
return;
}
child = spawnGogServe(runtimeConfig);
}, 2000);
});
@@ -365,7 +371,9 @@ async function startGmailWatch(
const result = await runCommandWithTimeout(args, { timeoutMs: 120_000 });
if (result.code !== 0) {
const message = result.stderr || result.stdout || "gog watch start failed";
if (fatal) throw new Error(message);
if (fatal) {
throw new Error(message);
}
defaultRuntime.error(message);
}
}