diff --git a/src/Composer/IO/ConsoleIO.php b/src/Composer/IO/ConsoleIO.php index bef7cea9f..55c80e29c 100644 --- a/src/Composer/IO/ConsoleIO.php +++ b/src/Composer/IO/ConsoleIO.php @@ -291,6 +291,10 @@ class ConsoleIO extends BaseIO $result = $helper->ask($this->input, $this->getErrorOutput(), $question); + if (!is_array($result)) { + return (string) array_search($result, $choices, true); + } + $results = array(); foreach ($choices as $index => $choice) { if (in_array($choice, $result, true)) {