added config.json.local

Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
tracer 2022-02-12 19:39:05 +01:00
parent 5d4586aff3
commit a97b8e926a
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#!/usr/local/bin/php
#!/usr/local/bin/php81
<?php declare(strict_types=1);
namespace App\Controller;
//#!/usr/bin/keyhelp-php81
@ -15,7 +15,11 @@ $version = '0.0.1';
require dirname(path: __DIR__) . '/vendor/autoload.php';
$configFile = dirname(path: __DIR__) ."/config.json";
$configFile = dirname(path: __DIR__) ."/config.json.local";
if (!file_exists(filename: $configFile)) {
$configFile = dirname(path: __DIR__) ."/config.json";
}
if (!file_exists(filename: $configFile)) {
echo 'Missing config file' . PHP_EOL;
if (confirm(message: 'Should I create a new config based on config.json.sample?')) {