fix for mkdirp ≥ 1

Forwarded: <no|not-needed|url proving that it has been forwarded>
Last-Update: 2020-10-23


Gbp-Pq: Name fix-for-mkdirp-1.diff
This commit is contained in:
Xavier Guimard 2024-05-07 15:07:33 +08:00 committed by luoyaoming
parent 73e5346a9c
commit 87e9ebacbb
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ Promise.longStackTraces();
var utils = require("./utils.js"); var utils = require("./utils.js");
var glob = Promise.promisify(require("glob")); var glob = Promise.promisify(require("glob"));
var fs = Promise.promisifyAll(require("fs")); var fs = Promise.promisifyAll(require("fs"));
var mkdirp = Promise.promisify(require("mkdirp")); var mkdirp = require("mkdirp");
var rimraf = Promise.promisify(require("rimraf")); var rimraf = Promise.promisify(require("rimraf"));
jobRunner.init(path.join(__dirname, ".."), function() { jobRunner.init(path.join(__dirname, ".."), function() {
@ -124,7 +124,7 @@ function getSourcePaths(features) {
function ensureDirectory(dir, isUsed, clean) { function ensureDirectory(dir, isUsed, clean) {
return (clean ? rimraf(dir) : Promise.resolve()).then(function() { return (clean ? rimraf(dir) : Promise.resolve()).then(function() {
if (!isUsed) return dir; if (!isUsed) return dir;
return mkdirp(dir).thenReturn(dir); return mkdirp(dir).then(()=>{return(dir)});
}); });
} }

View File

@ -8,7 +8,7 @@ var tableLogger = utils.tableLogger;
var argv = require("optimist").argv; var argv = require("optimist").argv;
var glob = Promise.promisify(require("glob")); var glob = Promise.promisify(require("glob"));
var path = require("path"); var path = require("path");
var mkdirp = Promise.promisify(require("mkdirp")); var mkdirp = require("mkdirp");
var rimraf = Promise.promisify(require("rimraf")); var rimraf = Promise.promisify(require("rimraf"));
var jobRunner = require("./job-runner/job-runner.js"); var jobRunner = require("./job-runner/job-runner.js");
var mochaRunner = require("./mocha_runner.js"); var mochaRunner = require("./mocha_runner.js");