deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.41k stars 1.47k forks source link

Fix crontab for cross platform support. #3829

Open scottfalkingham opened 1 month ago

scottfalkingham commented 1 month ago

This fixes crontab failing to recognize the existing cronjobs when running from Windows and connecting to a say a Linux server. It would lead to new existing sections not being found, and new ones being added each time it was run. This was due to trying to explode the crontab lines with PHP_EOL, as on a windows system, it would be looking for \r\n newlines in the crontab. However, the crontab was coming from a linux system, and the newlines would be \n.

This fix now looks for all types of newlines to split the crontab lines by.