From d9761cb1b54dbb296f39a4cdf97da6bc751aca21 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Fri, 17 Feb 2023 11:33:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=20for=20mkdirp=20=E2=89=A5=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forwarded: Last-Update: 2020-10-23 Gbp-Pq: Name fix-for-mkdirp-1.diff --- tools/build.js | 4 ++-- tools/test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build.js b/tools/build.js index d65375b..4c3ec6f 100644 --- a/tools/build.js +++ b/tools/build.js @@ -5,7 +5,7 @@ Promise.longStackTraces(); var utils = require("./utils.js"); var glob = Promise.promisify(require("glob")); var fs = Promise.promisifyAll(require("fs")); -var mkdirp = Promise.promisify(require("mkdirp")); +var mkdirp = require("mkdirp"); var rimraf = Promise.promisify(require("rimraf")); jobRunner.init(path.join(__dirname, ".."), function() { @@ -124,7 +124,7 @@ function getSourcePaths(features) { function ensureDirectory(dir, isUsed, clean) { return (clean ? rimraf(dir) : Promise.resolve()).then(function() { if (!isUsed) return dir; - return mkdirp(dir).thenReturn(dir); + return mkdirp(dir).then(()=>{return(dir)}); }); } diff --git a/tools/test.js b/tools/test.js index 27f5355..d4a303d 100644 --- a/tools/test.js +++ b/tools/test.js @@ -8,7 +8,7 @@ var tableLogger = utils.tableLogger; var argv = require("optimist").argv; var glob = Promise.promisify(require("glob")); var path = require("path"); -var mkdirp = Promise.promisify(require("mkdirp")); +var mkdirp = require("mkdirp"); var rimraf = Promise.promisify(require("rimraf")); var jobRunner = require("./job-runner/job-runner.js"); var mochaRunner = require("./mocha_runner.js");