From 76deb2d302a6643cf659d0fb640461b074b255b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pluchino?= Date: Wed, 18 Jan 2012 13:07:49 +0100 Subject: [PATCH] Fix bug on askAndHideAnswer() (because of the writeln() deletation) --- src/Composer/IO/ConsoleIO.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Composer/IO/ConsoleIO.php b/src/Composer/IO/ConsoleIO.php index 707c66579..fc790194e 100644 --- a/src/Composer/IO/ConsoleIO.php +++ b/src/Composer/IO/ConsoleIO.php @@ -124,16 +124,16 @@ class ConsoleIO implements IOInterface . addslashes($question) . '", ""))'); $command = "cscript //nologo " . escapeshellarg($vbscript); - $this->write($question); + $this->write($question, false); $value = rtrim(shell_exec($command)); unlink($vbscript); for ($i = 0; $i < strlen($value); ++$i) { - $this->write('*'); + $this->write('*', false); } - $this->writeln(''); + $this->write(''); return $value; } @@ -142,22 +142,22 @@ class ConsoleIO implements IOInterface if (rtrim(shell_exec($command)) === 'OK') { $command = "/usr/bin/env bash -c 'echo OK'"; - $this->write($question); + $this->write($question, false); $command = "/usr/bin/env bash -c 'read -s mypassword && echo \$mypassword'"; $value = rtrim(shell_exec($command)); for ($i = 0; $i < strlen($value); ++$i) { - $this->write('*'); + $this->write('*', false); } - $this->writeln(''); + $this->write(''); return $value; } // for other OS without shell_exec (does not hide the answer) - $this->writeln(''); + $this->write(''); return $this->ask($question); }