From a41fefd1d907efdefdce8d752e61579c5fe2af11 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 22 Jan 2012 20:21:14 +0100 Subject: [PATCH] Fix way of checking for Windows --- src/Composer/IO/ConsoleIO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/IO/ConsoleIO.php b/src/Composer/IO/ConsoleIO.php index 9c617cafa..0169d2908 100644 --- a/src/Composer/IO/ConsoleIO.php +++ b/src/Composer/IO/ConsoleIO.php @@ -117,7 +117,7 @@ class ConsoleIO implements IOInterface public function askAndHideAnswer($question) { // for windows OS (does not hide the answer in the popup, but it never appears in the STDIN history) - if (preg_match('/^win/i', PHP_OS)) { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { $vbscript = sys_get_temp_dir() . '/prompt_password.vbs'; file_put_contents($vbscript, 'wscript.echo(Inputbox("' . addslashes($question) . '","'