Skip to content

Commit 43ccf8a

Browse files
author
wrongecho
committed
config.php has to be written to parent dir
1 parent ff4f8a9 commit 43ccf8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/setup_cli.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function getOptionOrPrompt($key, $promptMessage, $required = false, $default = '
141141
echo "Welcome to the ITFlow CLI Setup.\n";
142142

143143
// If config exists, abort
144-
if (file_exists('config.php')) {
144+
if (file_exists('../config.php')) {
145145
echo "Database is already configured in config.php.\n";
146146
echo "To re-run the setup, remove config.php and run this script again.\n";
147147
exit;
@@ -233,15 +233,15 @@ function getOptionOrPrompt($key, $promptMessage, $required = false, $default = '
233233
$new_config .= "\$repo_branch = 'master';\n";
234234
$new_config .= "\$installation_id = '$installation_id';\n";
235235

236-
if (file_put_contents("config.php", $new_config) === false) {
236+
if (file_put_contents("../config.php", $new_config) === false) {
237237
die("Failed to write config.php. Check file permissions.\n");
238238
}
239239

240-
if (!file_exists('config.php')) {
240+
if (!file_exists('../config.php')) {
241241
die("config.php does not exist after write attempt.\n");
242242
}
243243

244-
include "config.php";
244+
require "../config.php";
245245

246246
// Import DB Schema
247247
echo "Importing database schema...\n";

0 commit comments

Comments
 (0)