mirror of
https://github.com/strapi/strapi.git
synced 2025-10-18 19:43:22 +00:00
Fix use ShellJS
This commit is contained in:
parent
6b1deaf0ed
commit
e60876fe0d
@ -13,6 +13,7 @@ const execSync = require('child_process').execSync;
|
||||
const _ = require('lodash');
|
||||
const fs = require('fs-extra');
|
||||
const inquirer = require('inquirer');
|
||||
const shell = require('shelljs');
|
||||
|
||||
// Logger.
|
||||
const logger = require('strapi-utils').logger;
|
||||
@ -207,14 +208,8 @@ module.exports = (scope, cb) => {
|
||||
try {
|
||||
require(path.resolve(`${scope.rootPath}/node_modules/${scope.client.connector}/lib/utils/connectivity.js`))(scope, cb.success, connectionValidation);
|
||||
} catch(err) {
|
||||
if(/^win/.test(process.platform)){
|
||||
execSync(`rmdir ${scope.rootPath} /s /q`);
|
||||
} else {
|
||||
execSync(`rm -r ${scope.rootPath}`);
|
||||
}
|
||||
|
||||
shell.rm('-r', scope.rootPath);
|
||||
logger.info('Copying the dashboard...');
|
||||
|
||||
cb.success();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user