Skip to content

Commit 6fea9e3

Browse files
committed
Increase process timeout for npm commands
1 parent 65c4cfb commit 6fea9e3

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/Console/Commands/NodeEcharts.php

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,37 @@
33
namespace Codebarista\LaravelEcharts\Console\Commands;
44

55
use Illuminate\Console\Command;
6+
use Illuminate\Contracts\Console\Isolatable;
67
use Illuminate\Support\Facades\Process;
78
use Throwable;
89

9-
class NodeEcharts extends Command
10+
class NodeEcharts extends Command implements Isolatable
1011
{
11-
/**
12-
* The name and signature of the console command.
13-
*
12+
/***
1413
* @var string
1514
*/
1615
protected $signature = 'codebarista:node-echarts {action}';
1716

18-
/**
19-
* The console command description.
20-
*
17+
/***
2118
* @var string
2219
*/
2320
protected $description = 'Install or update Node canvas and echarts';
2421

25-
/**
26-
* Execute the console command.
27-
*
22+
/***
2823
* @throws Throwable
2924
*/
3025
public function handle(): int
3126
{
3227
$action = $this->argument('action');
3328

3429
$process = Process::path(codebarista_path('tools/echarts'))
30+
->timeout(180)
3531
->run(['npm', $action]);
3632

3733
throw_if($process->failed(), $process->errorOutput());
3834

35+
$this->components->info('Node echarts have been installed successfully.');
36+
3937
return self::SUCCESS;
4038
}
4139
}

0 commit comments

Comments
 (0)