added config.json.local
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
5d4586aff3
commit
a97b8e926a
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/local/bin/php
|
#!/usr/local/bin/php81
|
||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
//#!/usr/bin/keyhelp-php81
|
//#!/usr/bin/keyhelp-php81
|
||||||
|
@ -15,7 +15,11 @@ $version = '0.0.1';
|
||||||
|
|
||||||
require dirname(path: __DIR__) . '/vendor/autoload.php';
|
require dirname(path: __DIR__) . '/vendor/autoload.php';
|
||||||
|
|
||||||
|
$configFile = dirname(path: __DIR__) ."/config.json.local";
|
||||||
|
if (!file_exists(filename: $configFile)) {
|
||||||
$configFile = dirname(path: __DIR__) ."/config.json";
|
$configFile = dirname(path: __DIR__) ."/config.json";
|
||||||
|
}
|
||||||
|
|
||||||
if (!file_exists(filename: $configFile)) {
|
if (!file_exists(filename: $configFile)) {
|
||||||
echo 'Missing config file' . PHP_EOL;
|
echo 'Missing config file' . PHP_EOL;
|
||||||
if (confirm(message: 'Should I create a new config based on config.json.sample?')) {
|
if (confirm(message: 'Should I create a new config based on config.json.sample?')) {
|
||||||
|
|
Loading…
Reference in New Issue