mirror of
https://github.com/strapi/strapi.git
synced 2025-10-12 08:36:40 +00:00
Reorder promises
This commit is contained in:
parent
fbd17f4205
commit
bf7daaf99a
@ -53,7 +53,6 @@ module.exports = (scope, cb) => {
|
|||||||
scope.database = {};
|
scope.database = {};
|
||||||
|
|
||||||
const connectionValidation = () => {
|
const connectionValidation = () => {
|
||||||
let formSteps = new Promise(resolve => {
|
|
||||||
const databaseChoises = [
|
const databaseChoises = [
|
||||||
{
|
{
|
||||||
name: 'MongoDB (highly recommended)',
|
name: 'MongoDB (highly recommended)',
|
||||||
@ -120,11 +119,6 @@ module.exports = (scope, cb) => {
|
|||||||
options: {}
|
options: {}
|
||||||
});
|
});
|
||||||
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
formSteps = formSteps.then(() => {
|
|
||||||
const asyncFn = [
|
const asyncFn = [
|
||||||
new Promise(resolve => {
|
new Promise(resolve => {
|
||||||
inquirer
|
inquirer
|
||||||
@ -186,6 +180,8 @@ module.exports = (scope, cb) => {
|
|||||||
scope.database.username = answers.username;
|
scope.database.username = answers.username;
|
||||||
scope.database.password = answers.password;
|
scope.database.password = answers.password;
|
||||||
|
|
||||||
|
logger.info('Testing database connection...');
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user