1
0
Files
breadcrumb-the-shire/lib/Console/Commands/DoctorCommand.php

30 lines
685 B
PHP
Raw Normal View History

2026-03-19 19:04:28 +01:00
<?php
namespace MintyPHP\Console\Commands;
use MintyPHP\Console\Command;
final class DoctorCommand extends Command
{
public function name(): string
{
return 'doctor';
}
public function description(): string
{
return 'Run system health checks';
}
public function execute(array $args, array $options): int
{
// doctor.php calls exit() internally — run as subprocess
// to avoid terminating the console process.
$scriptPath = $this->projectRoot() . '/bin/doctor.php';
2026-03-19 19:04:28 +01:00
$command = PHP_BINARY . ' ' . escapeshellarg($scriptPath);
passthru($command, $exitCode);
return $exitCode;
}
}