From 35867df36c36113f4e4f6914c2945c699cdea65e Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 19 Jan 2023 08:58:51 +0530 Subject: [PATCH] lint compliance --- scripts/clear.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/clear.js b/scripts/clear.js index f9ca46533..4f33aa4c2 100644 --- a/scripts/clear.js +++ b/scripts/clear.js @@ -1,18 +1,19 @@ var prompt = require('prompt-confirm'); const p = new prompt('Are you sure? This will permanently delete all existing data on your instance.'); -const nThen = require("nthen"); +//const nThen = require("nthen"); const Fs = require("fs"); -const Path = require("path"); +//const Path = require("path"); var config = require("../lib/load-config"); -var Hash = require('../www/common/common-hash'); +//var Hash = require('../www/common/common-hash'); var Env = require("../lib/env").create(config); Env.Log = { error: console.log }; +/* var keyOrDefaultString = function (key, def) { return Path.resolve(typeof(config[key]) === 'string'? config[key]: def); -}; +}; */ var paths = Env.paths; p.ask(function (answer) { if (!answer) { @@ -20,7 +21,7 @@ p.ask(function (answer) { return; } console.log('Deleting all data...'); - var n = nThen; + //var n = nThen; Object.values(paths).forEach(function (path) { console.log(`Deleting ${path}`); Fs.rmSync(path, { recursive: true, force: true });