From 374393b5967306be215121143818b62e0f12fab0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 22 Nov 2025 03:20:11 +0000 Subject: [PATCH] Update cron.log_name before makeCommand to avoid passing null to shell Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- back/services/cron.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/back/services/cron.ts b/back/services/cron.ts index 03c98bdb..f1870ee7 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -510,6 +510,10 @@ export default class CronService { log_name === '/dev/null' ? await getUniqPath(command, `${id}`) : log_name || (await getUniqPath(command, `${id}`)); + + // Update cron.log_name with the calculated uniqPath to avoid passing null to shell + cron.log_name = uniqPath; + const logTime = dayjs().format('YYYY-MM-DD-HH-mm-ss-SSS'); const logDirPath = path.resolve(config.logPath, `${uniqPath}`); await fs.mkdir(logDirPath, { recursive: true });