Merge remote-tracking branch 'curry684/issue-5130'
commit
9f3b1fd062
|
@ -59,7 +59,14 @@ class PluginInstaller extends LibraryInstaller
|
|||
}
|
||||
|
||||
parent::install($repo, $package);
|
||||
try {
|
||||
$this->composer->getPluginManager()->registerPackage($package, true);
|
||||
} catch(\Exception $e) {
|
||||
// Rollback installation
|
||||
$this->io->writeError('Plugin installation failed, rolling back');
|
||||
parent::uninstall($repo, $package);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue