From aa9a27634a26fe6cfb3cfb979ed8bff38ab356b5 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 23 Apr 2019 17:29:35 +0200 Subject: [PATCH] actual lint compliance --- scripts/migrations/migrate-tasks-v1.js | 1 - storage/tasks.js | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/migrations/migrate-tasks-v1.js b/scripts/migrations/migrate-tasks-v1.js index aa37b6b97..365faeb4c 100644 --- a/scripts/migrations/migrate-tasks-v1.js +++ b/scripts/migrations/migrate-tasks-v1.js @@ -10,7 +10,6 @@ var config = require("../../lib/load-config"); var FileStorage = require("../../" + (config.storage || "./storage/file")); var tasks; -var paths; nThen(function (w) { Logger.create(config, w(function (_log) { config.log = _log; diff --git a/storage/tasks.js b/storage/tasks.js index 939c2c0cc..0e09d0ad0 100644 --- a/storage/tasks.js +++ b/storage/tasks.js @@ -285,7 +285,7 @@ var runAll = function (env, cb) { }); }; -var migrate function (env, cb) { +var migrate = function (env, cb) { // list every task list(env, function (err, paths) { if (err) { @@ -307,6 +307,7 @@ var migrate function (env, cb) { }); return; } + task = _task; })); }).nThen(function (w) { if (bypass) { return; } @@ -323,17 +324,17 @@ var migrate function (env, cb) { }).nThen(function (w) { if (bypass) { return; } // remove - remove(env, path, function (err) { + remove(env, path, w(function (err) { if (err) { env.log.error("TASK_MIGRATION_REMOVE", { error: err, path: path, }); } - }); + })); }); }); - nt = nt.nThen(function (w) { + nt = nt.nThen(function () { cb(); }); }, true);