Skip to content

Commit df5a462

Browse files
authored
Update CrontabManager.php
If crontab is already populated, 'php bin/magento cron:install' adds '#~ MAGENTO START' and the rest of code directly to the last row of crontab without any spaces.
1 parent f93b914 commit df5a462

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Crontab/CrontabManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function removeTasks()
138138
private function generateSection($content, $tasks = [])
139139
{
140140
if ($tasks) {
141-
$content .= $this->getTasksBlockStart() . PHP_EOL;
141+
$content .= PHP_EOL . $this->getTasksBlockStart() . PHP_EOL;
142142
foreach ($tasks as $task) {
143143
$content .= $task['expression'] . ' ' . PHP_BINARY . ' ' . $task['command'] . PHP_EOL;
144144
}

0 commit comments

Comments
 (0)