[FIX] Installation without git - wrong logs + showing branch "unknown" (#693)

This commit is contained in:
Dennis 2023-01-31 16:09:37 +01:00 committed by GitHub
commit 985a4e94cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -135,7 +135,7 @@ class AppServiceProvider extends ServiceProvider
$branchname = $explodedstring[2]; //get the one that is always the branch name
} catch (Exception $e) {
$branchname = 'unknown';
Log::error($e);
Log::notice($e);
}
config(['BRANCHNAME' => $branchname]);

View file

@ -442,7 +442,7 @@
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
All rights
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
@if (!str_contains(config('BRANCHNAME'), 'main'))
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
@endif