This commit is contained in:
James Cole
2020-09-10 19:16:03 +02:00
parent 562be457ec
commit 402351a6b7

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Console\Commands;
use FireflyIII\Support\System\GeneratesInstallationId;
use FireflyIII\User;
use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
/**
* Class UpgradeFireflyInstructions.
@@ -56,10 +57,10 @@ class UpgradeFireflyInstructions extends Command
public function handle(): int
{
$this->generateInstallationId();
if ('update' === (string) $this->argument('task')) {
if ('update' === (string)$this->argument('task')) {
$this->updateInstructions();
}
if ('install' === (string) $this->argument('task')) {
if ('install' === (string)$this->argument('task')) {
$this->installInstructions();
}
@@ -70,7 +71,11 @@ class UpgradeFireflyInstructions extends Command
app('telemetry')->feature('system.database.driver', env('DB_CONNECTION', '(unknown)'));
app('telemetry')->feature('system.os.is_docker', $isDocker);
app('telemetry')->feature('system.command.executed', $this->signature);
app('telemetry')->feature('system.users.count', (string) User::count());
try {
app('telemetry')->feature('system.users.count', (string)User::count());
} catch (QueryException $e) {
// ignore error.
}
return 0;
}