fix CS
parent
bd83eb93bf
commit
58f0d4aeac
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue