diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index 954fade36f5ed727aac656d48af84393f8f29ca2..34abd6bba02014c3045915e678d455107fa78643 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -1707,9 +1707,18 @@ class project extends base {
         // --------------------------------------------------
         $sCfgout=$sTempBuildDir . '/ci-custom-vars';
         if (isset($this->_aPrjConfig['deploy']["configfile"]) && $this->_aPrjConfig['deploy']["configfile"]){
-            file_put_contents($sCfgout, $this->_aPrjConfig['deploy']["configfile"]);
+                        
+            # task#5047 - FIX EOL
+            $sCfgContent=$this->_aPrjConfig['deploy']["configfile"];
+            // detect unix, linux, mac
+            if (DIRECTORY_SEPARATOR === '/') {
+                $sCfgContent=str_replace("\r\n", "\n", $sCfgContent);
+            }
+            # /task#5047
+            
+            file_put_contents($sCfgout, $sCfgContent);
             $sReturn.=$this->_execAndSend('ls -l ' . $sCfgout);
-            $sReturn.=$this->_execAndSend('cat ' . $sCfgout);
+            $sReturn.=$this->_execAndSend('cat ' . $sCfgout);                
         }
 
         $sReturn.=$this->_oHtml->getBox("success", t('class-project-info-build-checkout-ok'));