diff --git a/src/shared/copy-templates.ts b/src/shared/copy-templates.ts index b6c977b..9ceebfd 100644 --- a/src/shared/copy-templates.ts +++ b/src/shared/copy-templates.ts @@ -2,7 +2,7 @@ import RepoBaseGenerator from './base-generator'; import copyTpl from './copy-tpl'; export async function copyTemplates(yo: RepoBaseGenerator) { - yo.templates.forEach((path) => { + await yo.templates.forEach((path) => { copyTpl(yo, path); }); } diff --git a/src/shared/copy-tpl.ts b/src/shared/copy-tpl.ts index 3261d6d..746fcd6 100644 --- a/src/shared/copy-tpl.ts +++ b/src/shared/copy-tpl.ts @@ -1,7 +1,7 @@ import RepoBaseGenerator from './base-generator'; export async function copyTpl(yo: RepoBaseGenerator, path: string, newPath?: string) { - yo.fs.copyTpl( + await yo.fs.copyTpl( yo.templatePath(path), yo.destinationPath(newPath || path), yo.context,