From 0c7295f28af5b5544fb5bfacc69fc71c87bacd5d Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Wed, 7 Aug 2024 01:26:09 +0700 Subject: [PATCH] Update install.php --- install.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/install.php b/install.php index 7dad26f8d..99e8982c1 100644 --- a/install.php +++ b/install.php @@ -50,7 +50,7 @@ function runProcess(string $cmd, string $input = null): void $process = proc_open($cmd, $descriptorSpec, $pipes); if (!is_resource($process)) { - echo "ERROR - Could not start subprocess.\n"; + out('- Could not start subprocess', 'error'); return; } @@ -93,13 +93,13 @@ if (!is_file(ROOT . 'vendor/autoload.php')) { } } // Installing dependencies - if (is_file(ROOT . 'composer.phar')) { - out('- Installing dependencies...'); - runProcess('php ' . ROOT . 'composer.phar install --no-interaction --no-ansi'); - out('- Completed!'); - } else { + if (!is_file(ROOT . 'composer.phar')) { out('- composer.phar not found', 'error'); + exit; } + out('- Installing dependencies...'); + runProcess('php ' . ROOT . 'composer.phar install --no-interaction --no-ansi'); + out('- Completed!'); } // Preparing ENV @@ -107,3 +107,6 @@ if (is_file(ROOT . '.env.example') && !is_file(ROOT . '.env')) { copy(ROOT . '.env.example', ROOT . '.env'); out('- Environment file created!', 'success'); } + +// Editing ENV file +