refactor(cli): use flush method for cleanLogs

This commit is contained in:
Nicolas Meienberger 2023-10-25 08:16:53 +02:00 committed by Nicolas Meienberger
parent ef0298665c
commit 435ff66522

View file

@ -104,11 +104,7 @@ export class SystemExecutors {
public cleanLogs = async () => {
try {
const { rootFolderHost } = getEnv();
await fs.promises.rm(path.join(rootFolderHost, 'logs'), { recursive: true, force: true });
await fs.promises.mkdir(path.join(rootFolderHost, 'logs'));
this.logger.flush();
this.logger.info('Logs cleaned successfully');
return { success: true, message: '' };