Prevent timeout errors with versa run

This commit is contained in:
Oliver Davies 2024-02-19 13:00:00 +00:00
parent 4ce4b0ec84
commit e31d0360e5
2 changed files with 3 additions and 1 deletions

View file

@ -2,7 +2,7 @@
## Unreleased
None.
* Prevent timeout errors with `versa run`.
## 0.2.0

2
versa
View file

@ -50,6 +50,7 @@ $application->setCode(function (InputInterface $input): int {
if ($filesystem->exists($workingDir.'/docker-compose.yaml')) {
$process = new Process(command: ['docker', 'compose', 'up']);
$process->setTimeout(null);
$process->setTty(true);
$process->setWorkingDirectory($workingDir);
$process->run();
@ -58,6 +59,7 @@ $application->setCode(function (InputInterface $input): int {
case 'sculpin':
// TODO: how to pass arbitrary arguments, such as `--port 8001`?
$process = new Process(command: ['./vendor/bin/sculpin', 'generate', '--server', '--watch']);
$process->setTimeout(null);
$process->setTty(true);
$process->setWorkingDirectory($workingDir);
$process->run();