Browse Source

Fixed detection of hidden password input capability

Roberto Ricci 13 years ago
parent
commit
ec665a01ab
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/Composer/IO/ConsoleIO.php

+ 1 - 2
src/Composer/IO/ConsoleIO.php

@@ -139,9 +139,8 @@ class ConsoleIO implements IOInterface
         }
         }
 
 
         // for other OS with shell_exec (hide the answer)
         // for other OS with shell_exec (hide the answer)
+        $command = "/usr/bin/env bash -c 'echo OK'";
         if (rtrim(shell_exec($command)) === 'OK') {
         if (rtrim(shell_exec($command)) === 'OK') {
-            $command = "/usr/bin/env bash -c 'echo OK'";
-
             $this->write($question, false);
             $this->write($question, false);
 
 
             $command = "/usr/bin/env bash -c 'read -s mypassword && echo \$mypassword'";
             $command = "/usr/bin/env bash -c 'read -s mypassword && echo \$mypassword'";