[BUGFIX] Cygwin support 65/36765/3
authorFrederic Gaus <gaus@flagbit.de>
Mon, 9 Feb 2015 10:52:39 +0000 (11:52 +0100)
committerFrank Nägler <typo3@naegler.net>
Sun, 15 Mar 2015 16:10:17 +0000 (17:10 +0100)
Cygwin is a GNU UNIX emulation layer for Windows systems.
With this patch the TYPO3 OS detection will recognize when
running on cygwin and thus TYPO3_OS won't be defined as 'WIN'.

Change-Id: I8e04b1858bcd0baa4aeeaf066f4e0b391dd08eb2
Resolves: #14523
Releases: master
Reviewed-on: http://review.typo3.org/36765
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php

index 562e842..24b0bdd 100644 (file)
@@ -280,7 +280,7 @@ class SystemEnvironmentBuilder {
         */
        static protected function getTypo3Os() {
                $typoOs = '';
-               if (!stristr(PHP_OS, 'darwin') && stristr(PHP_OS, 'win')) {
+               if (!stristr(PHP_OS, 'darwin') && !stristr(PHP_OS, 'cygwin') && stristr(PHP_OS, 'win')) {
                        $typoOs = 'WIN';
                }
                return $typoOs;