Skip to content

Commit

Permalink
fix: use async/await when copy file
Browse files Browse the repository at this point in the history
  • Loading branch information
taomas committed Mar 1, 2021
1 parent 5cdfd95 commit 7a1e738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export abstract class Template extends BaseClass {
private async writeFile(srcPath: string, outputPath: string) {
const isEjsFile = /(.*)(.ejs)$/.test(srcPath)
if (!isEjsFile) {
this.fs.copy(srcPath, outputPath, {})
await this.fs.copy(srcPath, outputPath, {})
} else {
const content = await this.fs.readFile(srcPath, 'utf8')
const rendered = await ejs.render(
Expand Down

0 comments on commit 7a1e738

Please sign in to comment.