andres-montanez / Magallanes

The PHP Deployment Tool
https://magephp.com
MIT License
691 stars 169 forks source link

[RFC] do not use PHP_EOL for remote data #429

Closed fritzmg closed 3 years ago

fritzmg commented 5 years ago

This fixes #428

Currently Magallanes uses PHP_EOL for every instance where it wants to either parse or write a new 'new line character'.

However, when Magallanes is used on Windows, this breaks things like the CleanupTask (see #428) - if the remote host is a Unix machine (which it usually is).

The proposed solution isn't perfect and simply assumes, that the remote host will always be a Unix machine.

May be the remote EOL character should be made configurable in the .mage.yml and simply defaults to "\n" otherwise. What do you think?

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 695dfc5ff2eef1831ccd96df971085cd99185349 on fritzmg:fix-cleanup-task-windows into e30de6b719c923d70917a9f9364efdb29b7e9362 on andres-montanez:master.

andres-montanez commented 3 years ago

Thanks @fritzmg , it makes sense. I would have prefer to define a constant inside Magallanes and define it with the "\n", but let's roll with it as is.

Thanks for your time and effort!