From c2d88a08b796ca19c8b5ec63bfd34ac32ead4208 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 8 Jul 2016 15:55:17 +0200 Subject: Remove unneeded checks if it runs on a Windows machine * the setup check is still there --- console.php | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'console.php') diff --git a/console.php b/console.php index ed19d41d484..4576cce885c 100644 --- a/console.php +++ b/console.php @@ -59,20 +59,18 @@ try { set_exception_handler('exceptionHandler'); - if (!OC_Util::runningOnWindows()) { - if (!function_exists('posix_getuid')) { - echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL; - exit(0); - } - $user = posix_getpwuid(posix_getuid()); - $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php')); - if ($user['name'] !== $configUser['name']) { - echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL; - echo "Current user: " . $user['name'] . PHP_EOL; - echo "Owner of config.php: " . $configUser['name'] . PHP_EOL; - echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL; - exit(0); - } + if (!function_exists('posix_getuid')) { + echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL; + exit(0); + } + $user = posix_getpwuid(posix_getuid()); + $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php')); + if ($user['name'] !== $configUser['name']) { + echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL; + echo "Current user: " . $user['name'] . PHP_EOL; + echo "Owner of config.php: " . $configUser['name'] . PHP_EOL; + echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL; + exit(0); } $oldWorkingDir = getcwd(); -- cgit v1.2.3