Ensure slow commands have time to run

This commit is contained in:
Dane Everitt 2021-01-23 16:29:18 -08:00
parent fd9245b2c5
commit 2a8d336336
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -105,6 +105,7 @@ class UpgradeCommand extends Command
$this->line('$upgrader> ' . implode(' ', $command));
$process = new Process($command);
$process->setTimeout(10 * 60);
$process->run(function ($type, $buffer) {
$this->line($buffer);
});
@ -134,7 +135,8 @@ class UpgradeCommand extends Command
$this->withProgress($bar, function () use ($user) {
$this->line("\$upgrader> chown -R {$user}:{$user} *");
$process = Process::fromShellCommandline("chown -R {$user}:{$user} *");
$process = Process::fromShellCommandline("chown -R {$user}:{$user} *", $this->getLaravel()->basePath());
$process->setTimeout(10 * 60);
$process->run(function ($type, $buffer) {
$this->{$type === Process::ERR ? 'error' : 'line'}($buffer);
});