Fix null log_name handling in runSingle method

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-22 03:09:44 +00:00
parent 256edaf7d7
commit 103065c1a4

View File

@ -509,7 +509,7 @@ export default class CronService {
const uniqPath =
log_name === '/dev/null'
? await getUniqPath(command, `${id}`)
: log_name;
: log_name || (await getUniqPath(command, `${id}`));
const logTime = dayjs().format('YYYY-MM-DD-HH-mm-ss-SSS');
const logDirPath = path.resolve(config.logPath, `${uniqPath}`);
await fs.mkdir(logDirPath, { recursive: true });