Skip to content

Commit 361ee9d

Browse files
committed
[#1693] Remove promise for process.exit()
1 parent 943f966 commit 361ee9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/scripts/examples.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ async function createProjectsInP5user(projectsInAllCategories) {
237237
try {
238238
const res = await rp(options);
239239
const user = await User.findOne({ username: 'p5' }).exec();
240-
Q.all(projectsInAllCategories.map(projectsInOneCategory => Q.all(projectsInOneCategory.map(async (project) => {
240+
await Q.all(projectsInAllCategories.map(projectsInOneCategory => Q.all(projectsInOneCategory.map(async (project) => {
241241
let newProject;
242242
const a = objectID().toHexString();
243243
const b = objectID().toHexString();
@@ -336,8 +336,8 @@ async function createProjectsInP5user(projectsInAllCategories) {
336336
} catch (error) {
337337
throw error;
338338
}
339-
}))))
340-
.then(() => process.exit());
339+
}))));
340+
process.exit();
341341
} catch (error) {
342342
throw error;
343343
}

0 commit comments

Comments
 (0)