1
0
Fork 0

Fire pre-update|install-cmd event as early as it should be, refs #2520

pull/2524/merge
Jordi Boggiano 2013-12-26 16:35:20 +01:00
parent 8a5d072b87
commit 384ed2822d
1 changed files with 6 additions and 6 deletions

View File

@ -173,6 +173,12 @@ class Installer
unset($devRepo, $package);
// end BC
if ($this->runScripts) {
// dispatch pre event
$eventName = $this->update ? ScriptEvents::PRE_UPDATE_CMD : ScriptEvents::PRE_INSTALL_CMD;
$this->eventDispatcher->dispatchCommandEvent($eventName, $this->devMode);
}
$this->downloadManager->setPreferSource($this->preferSource);
$this->downloadManager->setPreferDist($this->preferDist);
@ -199,12 +205,6 @@ class Installer
$aliases = $this->getRootAliases();
$this->aliasPlatformPackages($platformRepo, $aliases);
if ($this->runScripts) {
// dispatch pre event
$eventName = $this->update ? ScriptEvents::PRE_UPDATE_CMD : ScriptEvents::PRE_INSTALL_CMD;
$this->eventDispatcher->dispatchCommandEvent($eventName, $this->devMode);
}
try {
$this->suggestedPackages = array();
$res = $this->doInstall($localRepo, $installedRepo, $platformRepo, $aliases, $this->devMode);