Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion console.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ function exceptionHandler($exception) {
/* base.php will have removed eventual debug options from argv in $_SERVER */
$argv = $_SERVER['argv'];
$input = new ArgvInput($argv);
$application->loadCommands($input, new ConsoleOutput());
$output = new ConsoleOutput();
$application->loadCommands($input, $output);

$eventLogger->end('console:build_application');
$eventLogger->start('console:run', 'Run the command');
Expand All @@ -98,6 +99,13 @@ function exceptionHandler($exception) {
$profile->setMethod('occ');
$profile->setUrl(implode(' ', $argv));
$profiler->saveProfile($profile);

$urlGenerator = Server::get(\OCP\IURLGenerator::class);
$url = $urlGenerator->linkToRouteAbsolute('profiler.main.profiler', [
'profiler' => 'db',
'token' => $profile->getToken(),
]);
$output->writeln('Profiler output available at ' . $url);
}

if ($exitCode > 255) {
Expand Down
Loading