Skip to content

Commit 170435b

Browse files
committed
Increased timeout on devtools install
Fix for when class is already loaded Minor fix on the amount of steps
1 parent 96afd1b commit 170435b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/Console/Commands/RequireDevTools.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class RequireDevTools extends Command
3535
*/
3636
public function handle()
3737
{
38-
$this->progressBar = $this->output->createProgressBar(15);
38+
$this->progressBar = $this->output->createProgressBar(29);
3939
$this->progressBar->minSecondsBetweenRedraws(0);
4040
$this->progressBar->maxSecondsBetweenRedraws(120);
4141
$this->progressBar->setRedrawFrequency(1);
@@ -138,6 +138,7 @@ public function handle()
138138

139139
// Require package
140140
$process = new Process(['composer', 'require', '--dev', '--with-all-dependencies', 'backpack/devtools']);
141+
$process->setTimeout(300);
141142
$process->run(function ($type, $buffer) {
142143
$this->progressBar->advance();
143144
});
@@ -151,7 +152,9 @@ public function handle()
151152
$this->info(' Now running the DevTools installation command.');
152153

153154
// manually include the command in the run-time
154-
include base_path('vendor/backpack/devtools/src/Console/Commands/InstallDevTools.php');
155+
if (! class_exists(\Backpack\DevTools\Console\Commands\InstallDevTools::class)) {
156+
include base_path('vendor/backpack/devtools/src/Console/Commands/InstallDevTools.php');
157+
}
155158

156159
$this->call(\Backpack\DevTools\Console\Commands\InstallDevTools::class);
157160
}

0 commit comments

Comments
 (0)