if (!
$force && CLI::
prompt('Are you sure you want to delete the logs?',
['n', 'y'
]) === 'n'
) { // @codeCoverageIgnoreStart
CLI::
error('Deleting logs aborted.', 'light_gray', 'red'
);
CLI::
error('If you want, use the "-force" option to force delete all log files.', 'light_gray', 'red'
);
CLI::
newLine();
return;
// @codeCoverageIgnoreEnd
} helper('filesystem'
);
if (!
delete_files(WRITEPATH . 'logs', false, true
)) { // @codeCoverageIgnoreStart
CLI::
error('Error in deleting the logs files.', 'light_gray', 'red'
);
CLI::
newLine();
return;
// @codeCoverageIgnoreEnd
} CLI::
write('Logs cleared.', 'green'
);