diff --git a/Command/DumpCommand.php b/Command/DumpCommand.php index 9c89a1d7..8e8746b7 100644 --- a/Command/DumpCommand.php +++ b/Command/DumpCommand.php @@ -110,9 +110,16 @@ protected function execute(InputInterface $input, OutputInterface $stdout) ); $self = $this; - $batch->execute(function ($name) use ($self, $stdout) { + $promise = $batch->execute(function ($name) use ($self, $stdout) { $self->dumpAsset($name, $stdout); }); + + $promise->wait(); + + $promise->fail(function () { + throw new \RuntimeException('Dump failed!'); + }); + } else { foreach ($this->am->getNames() as $name) { $this->dumpAsset($name, $stdout);