refactor(cli): use flush method for cleanLogs
This commit is contained in:
parent
ef0298665c
commit
435ff66522
1 changed files with 1 additions and 5 deletions
|
@ -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: '' };
|
||||
|
|
Loading…
Add table
Reference in a new issue