From 020286cc4c1ae9a2fa67ab2bee33a6c434af285e Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Wed, 24 Nov 2021 23:10:02 -0800 Subject: [PATCH] Fix error occuring with nodePlop usage --- src/console-out.js | 4 ++-- tests/examples/javascript/plopfile.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/console-out.js b/src/console-out.js index fea43b22..8d77f089 100644 --- a/src/console-out.js +++ b/src/console-out.js @@ -24,8 +24,8 @@ function getHelpMessage(generator) { ); } -function chooseOptionFromList(plopList, message) { - const plop = nodePlop(); +async function chooseOptionFromList(plopList, message) { + const plop = await nodePlop(); const generator = plop.setGenerator("choose", { prompts: [ { diff --git a/tests/examples/javascript/plopfile.js b/tests/examples/javascript/plopfile.js index 38b6927b..6617aa49 100644 --- a/tests/examples/javascript/plopfile.js +++ b/tests/examples/javascript/plopfile.js @@ -1,6 +1,7 @@ import path from "path"; import fs from "fs"; import inquirerDirectory from "inquirer-directory"; + export default function (plop) { // starting prompt can be customized to display what you want // plop.setWelcomeMessage('[CUSTOM]'.yellow + ' What can I do for you?');