Smasty 12 years ago
parent
commit
58f0d4aeac
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/Composer/IO/ConsoleIO.php

+ 3 - 3
src/Composer/IO/ConsoleIO.php

@@ -164,13 +164,13 @@ class ConsoleIO implements IOInterface
 
         // handle other OSs with bash/zsh/ksh/csh if available to hide the answer
         $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null";
-        foreach(array('bash', 'zsh', 'ksh', 'csh') as $sh){
-            if('OK' === rtrim(shell_exec(sprintf($test, $sh)))){
+        foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) {
+            if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) {
                 $shell = $sh;
                 break;
             }
         }
-        if(isset($shell)){
+        if (isset($shell)) {
             $this->write($question, false);
             $readCmd = ($shell === 'csh') ? 'set mypassword = $<' : 'read mypassword';
             $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd);