mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-09 09:12:16 +02:00
Fix configuration management
This commit is contained in:
parent
20aa01174c
commit
3923b632de
|
@ -590,8 +590,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
|
||||||
$projectName = $this->getConfig()->general('name', false);
|
$projectName = $this->getConfig()->general('name', false);
|
||||||
$projectEmail = $this->getConfig()->general('email', false);
|
$projectEmail = $this->getConfig()->general('email', false);
|
||||||
$notificationsEnabled = $this->getConfig()->general('notifications', false);
|
$notificationsEnabled = $this->getConfig()->general('notifications', false);
|
||||||
$ccEmail = $this->getConfig()->general('email_options.cc', null);
|
$emailOptions = $this->getConfig()->general('email_options', array());
|
||||||
$bccEmail = $this->getConfig()->general('email_options.bcc', null);
|
|
||||||
|
|
||||||
// We need notifications enabled, and a project name and email to send the notification
|
// We need notifications enabled, and a project name and email to send the notification
|
||||||
if (!$projectName || !$projectEmail || !$notificationsEnabled) {
|
if (!$projectName || !$projectEmail || !$notificationsEnabled) {
|
||||||
|
@ -604,12 +603,12 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
|
||||||
->setLogFile(Console::getLogFile())
|
->setLogFile(Console::getLogFile())
|
||||||
->setEnvironment($this->getConfig()->getEnvironment());
|
->setEnvironment($this->getConfig()->getEnvironment());
|
||||||
|
|
||||||
if ($ccEmail) {
|
if (isset($emailOptions['cc'])) {
|
||||||
$mailer->setCc($ccEmail);
|
$mailer->setCc($emailOptions['cc']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($bccEmail) {
|
if (isset($emailOptions['bcc'])) {
|
||||||
$mailer->setBcc($bccEmail);
|
$mailer->setBcc($emailOptions['bcc']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$mailer->send($result);
|
$mailer->send($result);
|
||||||
|
|
Loading…
Reference in a new issue