mirror of
https://github.com/whyour/qinglong.git
synced 2026-02-12 22:16:42 +08:00
Update cron.log_name before makeCommand to avoid passing null to shell
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
103065c1a4
commit
374393b596
|
|
@ -510,6 +510,10 @@ export default class CronService {
|
||||||
log_name === '/dev/null'
|
log_name === '/dev/null'
|
||||||
? await getUniqPath(command, `${id}`)
|
? await getUniqPath(command, `${id}`)
|
||||||
: log_name || (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 logTime = dayjs().format('YYYY-MM-DD-HH-mm-ss-SSS');
|
||||||
const logDirPath = path.resolve(config.logPath, `${uniqPath}`);
|
const logDirPath = path.resolve(config.logPath, `${uniqPath}`);
|
||||||
await fs.mkdir(logDirPath, { recursive: true });
|
await fs.mkdir(logDirPath, { recursive: true });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user