- Also upped more timeouts.
- Added extra advisory text for restore regarding permissions.
#!/usr/bin/env php
<?php
+declare(strict_types=1);
if (php_sapi_name() !== 'cli') {
exit;
// Run the command and handle errors
try {
+ $output->writeln("<warn>WARNING: This CLI is in early alpha testing.</warn>");
+ $output->writeln("<warn>There's a high chance of running into bugs, and the CLI API is subject to change.</warn>");
+ $output->writeln("");
+
$app->run(null, $output);
} catch (Exception $error) {
$output = (new ConsoleOutput())->getErrorOutput();
{
$errors = (new ProgramRunner('php', '/usr/bin/php'))
->withTimeout(60)
- ->withIdleTimeout(5)
+ ->withIdleTimeout(15)
->withEnvironment(EnvironmentLoader::load($installDir))
->runCapturingAllOutput([
Paths::join($installDir, 'artisan'),
$this->deleteDirectoryAndContents($extractDir);
$output->writeln("<success>\nRestore operation complete!</success>");
+ $output->writeln("<info>You may need to fix file/folder permissions so that the webserver has</info>");
+ $output->writeln("<info>the required read/write access to the necessary directories & files.</info>");
return Command::SUCCESS;
}
{
$output = (new ProgramRunner('mysql', '/usr/bin/mysql'))
->withEnvironment(['MYSQL_PWD' => $this->password])
- ->withTimeout(240)
- ->withIdleTimeout(5)
+ ->withTimeout(300)
+ ->withIdleTimeout(300)
->runCapturingStdErr([
'-h', $this->host,
'-P', $this->port,
try {
(new ProgramRunner('mysqldump', '/usr/bin/mysqldump'))
- ->withTimeout(240)
- ->withIdleTimeout(15)
+ ->withTimeout(300)
+ ->withIdleTimeout(300)
->withEnvironment(['MYSQL_PWD' => $this->password])
->runWithoutOutputCallbacks([
'-h', $this->host,