Ensure log directory
This commit is contained in:
@@ -575,6 +575,9 @@ function mailboxNameForLocation(location, manifest) {
|
||||
|
||||
function startAppTask(appId, args, callback) {
|
||||
const logFile = path.join(paths.LOG_DIR, appId, 'apptask.log');
|
||||
|
||||
if (!fs.existsSync(path.dirname(logFile))) safe.fs.mkdirSync(path.dirname(logFile)); // ensure directory
|
||||
|
||||
let task = tasks.startTask(tasks.TASK_APP, [ appId, args ], { logFile });
|
||||
task.on('start', function (taskId) {
|
||||
appdb.update(appId, { taskId: taskId }, function (error) {
|
||||
|
||||
Reference in New Issue
Block a user