Skip to content

Commit b50a1c2

Browse files
committed
MAGETWO-93701: Make cron:run CLI command react on cron disable configuration
1 parent 863764e commit b50a1c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/code/Magento/Cron/Console/Command/CronCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Output\OutputInterface;
1212
use Symfony\Component\Console\Input\InputOption;
13+
use Magento\Framework\App\ObjectManager;
1314
use Magento\Framework\App\ObjectManagerFactory;
1415
use Magento\Store\Model\Store;
1516
use Magento\Store\Model\StoreManager;
@@ -51,7 +52,9 @@ public function __construct(
5152
DeploymentConfig $deploymentConfig = null
5253
){
5354
$this->objectManagerFactory = $objectManagerFactory;
54-
$this->deploymentConfig = $deploymentConfig;
55+
$this->deploymentConfig = $deploymentConfig ?: ObjectManager::getInstance()->get(
56+
DeploymentConfig::class
57+
);
5558
parent::__construct();
5659
}
5760

0 commit comments

Comments
 (0)