1
0
Fork 0

Fix new file being leftover if require in new dir fails to resolve requirements

pull/10334/head
Jordi Boggiano 2021-12-04 14:56:32 +01:00
parent b42a897ebe
commit 1cfdaf43f1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 0 deletions

View File

@ -206,6 +206,8 @@ EOT
);
} catch (\Exception $e) {
if ($this->newlyCreated) {
$this->revertComposerFile(false);
throw new \RuntimeException('No composer.json present in the current directory ('.$this->file.'), this may be the cause of the following exception.', 0, $e);
}