flarum/framework · info
Aborting.
Error message
Aborting.
What it means
In ClearLogsCommand, when the user declines the confirmation prompt (and did not pass --force), the command warns 'Aborting.' and returns without deleting the counted records. This is normal interactive cancellation, not a failure.
Solutions
- Re-run and answer yes to the confirmation
- Pass --force to skip the confirmation prompt
- For CI, add --force deliberately after verifying the --before cutoff
Example fix
// before php flarum clear:logs --before=2026-01-01 # declines prompt // after php flarum clear:logs --before=2026-01-01 --force
Defensive patterns
Strategy: fallback
Validate before calling
if (!posix_isatty(STDIN) && !$force) { // non-interactive: auto-decline or pass --force } Prevention
- Pass --force in non-interactive CI contexts deliberately
- Preview the count with a read-only query before confirming
- Document the confirmation step for operators
When it happens
Trigger: Running `php flarum clear:logs` with matching records and answering 'no' to the '<count> records will be deleted...' confirm prompt.
Common situations: Operator second-guesses a destructive deletion, runs the command non-interactively without --force so the prompt is auto-declined, or CI pipelines that cannot answer prompts.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- This value is required
- There are no entries matching this query. Aborting.
- No option chosen. Run with --help for the list of options.
AI-assisted analysis of flarum/framework@4b939f6853 (2026-09-15).
Data as JSON: /api/errors/580835d0fee0e453.
Report an issue: GitHub.
Appendix: source
Thrown at extensions/audit/src/Console/ClearLogsCommand.php:39
protected $signature = 'audit:clear {--before= : Delete entries older than the specified date. Any Carbon syntax is supported} {--reset : Delete all data, database tables and disable extension} {--force : Don\'t ask for confirmation}';
protected $description = 'Permanently destroy audit log entries';
public function handle(Connection $db, ExtensionManager $manager): void
{
if ($before = $this->option('before')) {
$beforeDate = Carbon::parse($before);
$query = AuditLog::query()->where('created_at', '<', $beforeDate);
$count = $query->count();
if ($count === 0) {
$this->warn('There are no entries matching this query. Aborting.');
return;
}
if (! $this->option('force') && ! $this->confirm($count.' records will be deleted from the log table. Continue?')) {
$this->warn('Aborting.');
return;
}
$query->delete();
$this->info($count.' records deleted.');
$this->info('All done!');
AuditLogger::log('audit_log_cleared', [
'before' => $beforeDate->toIso8601String(),
'deleted_count' => $count,
]);
return;
}
if ($this->option('reset')) {
if (! $this->option('force') && ! $this->confirm('This will delete the audit log database table and disable the extension. Continue?')) {View on GitHub (pinned to 4b939f6853)