Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/setup_cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function getOptionOrPrompt($key, $promptMessage, $required = false, $default = '
echo "Welcome to the ITFlow CLI Setup.\n";

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

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

if (!file_exists('config.php')) {
if (!file_exists('../config.php')) {
die("config.php does not exist after write attempt.\n");
}

include "config.php";
require "../config.php";

// Import DB Schema
echo "Importing database schema...\n";
Expand Down
Loading