Fix archive command now that zips are extracted async, refs composer/satis#655
parent
db1d9e75be
commit
b602b19f6d
|
@ -16,6 +16,7 @@ use Composer\Downloader\DownloadManager;
|
|||
use Composer\Package\RootPackageInterface;
|
||||
use Composer\Util\Filesystem;
|
||||
use Composer\Util\Loop;
|
||||
use Composer\Util\SyncHelper;
|
||||
use Composer\Json\JsonFile;
|
||||
use Composer\Package\CompletePackageInterface;
|
||||
|
||||
|
@ -149,8 +150,9 @@ class ArchiveManager
|
|||
try {
|
||||
// Download sources
|
||||
$promise = $this->downloadManager->download($package, $sourcePath);
|
||||
$this->loop->wait(array($promise));
|
||||
$this->downloadManager->install($package, $sourcePath);
|
||||
SyncHelper::await($this->loop, $promise);
|
||||
$promise = $this->downloadManager->install($package, $sourcePath);
|
||||
SyncHelper::await($this->loop, $promise);
|
||||
} catch (\Exception $e) {
|
||||
$filesystem->removeDirectory($sourcePath);
|
||||
throw $e;
|
||||
|
|
Loading…
Reference in New Issue