vapor/console-kit

Command Options do not pick up default values.

EricWVGG opened this issue · 4 comments

sample project: https://github.com/EricWVGG/vapor-command-problem

This command should respect "one" as the default value for "answer"
vapor run quiz
Expected response: better not be the middle one
Actual response: What?

Thank you for addressing my other issue. Regarding this one, this still strikes me as broken. Is it filed in the correct repo?

vi4m commented

It works when you provide empty "option" parameter. I think it's quite reasonable, becasuse it's the default value for an option, not whole command.

vapor run quiz --answer

vi4m commented

Ok, I re-read the documentation, and it seems, it's really a bug here. Have a fix already :)

vi4m commented

Fixed here: #79