Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
fix: show file service log when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcanessa committed Dec 17, 2021
1 parent 7917e33 commit ea35621
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/node/file/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ export class FileService {
async writeFileAsync(fileNameWithoutExtension: string, content: any): Promise<void> {
const filePath = this.getFilePath(fileNameWithoutExtension);

console.log(`Writing file '${filePath}'`);
if (this.config.enableLog) {
console.log(`Writing file '${filePath}'`);
}
await promises.writeFile(filePath, content);
console.log(`File saved`);
if (this.config.enableLog) {
console.log(`File saved`);
}
}

private getFilePath(fileNameWithoutExtension: string) {
Expand Down

0 comments on commit ea35621

Please sign in to comment.