瀏覽代碼

Merge pull request #232 from robywan/hidden-password-fix

Fixed detection of hidden password input capability
Jordi Boggiano 13 年之前
父節點
當前提交
5ce9de422b
共有 1 個文件被更改,包括 1 次插入2 次删除
  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)
+        $command = "/usr/bin/env bash -c 'echo OK'";
         if (rtrim(shell_exec($command)) === 'OK') {
-            $command = "/usr/bin/env bash -c 'echo OK'";
-
             $this->write($question, false);
 
             $command = "/usr/bin/env bash -c 'read -s mypassword && echo \$mypassword'";