diff --git a/src/Command/CloseIssueCommand.php b/src/Command/CloseIssueCommand.php index 88bebd5..ad89c69 100644 --- a/src/Command/CloseIssueCommand.php +++ b/src/Command/CloseIssueCommand.php @@ -173,6 +173,11 @@ private function getMessage() */ private function askChoices($prompt, $list, $errorMessage, $default = null) { + // default given and present in $list, use that + if ($default && isset($list[$default])) { + return $default; + } + // avoid asking if answer is known switch (count($list)) { case 0: