1
0
Fork 0

Clean up properly after creating the vendor dir

pull/3154/head
Jordi Boggiano 2014-07-23 19:02:01 +02:00
parent 4f5d979bee
commit 1110074d5f
1 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,12 @@ abstract class ArchiveDownloader extends FileDownloader
}
$this->filesystem->removeDirectory($temporaryDir);
if ($this->filesystem->isDirEmpty($this->config->get('vendor-dir').'/composer/')) {
$this->filesystem->removeDirectory($this->config->get('vendor-dir').'/composer/');
}
if ($this->filesystem->isDirEmpty($this->config->get('vendor-dir'))) {
$this->filesystem->removeDirectory($this->config->get('vendor-dir'));
}
} catch (\Exception $e) {
// clean up
$this->filesystem->removeDirectory($path);