Hacker News new | past | comments | ask | show | jobs | submit login

Error: The value 'ZZZ' is invalid for '<high-value>'

That is an awful default error for validating the type. The program knows it failed to parse as an Int but doesn't tell you anything about that.

Error: The value 'ZZZ' is invalid for '<high-value>' of type Int

Also, the help should automatically tell you the expected types as well.

ARGUMENTS: <high-value>: Int The highest value to pick.




There's an issue open for this, so they'll probably have it pretty soon: https://github.com/apple/swift-argument-parser/issues/8




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: