Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add covariance to main method #197

Merged
merged 1 commit into from Jun 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
### Changed
- When `printHelpOnEmptyArgs` is `true` and no arguments are present, or when `invokeWithoutSubcommand` is `false` and no subcommand is present, `CliktCommand.main` will now exit with status code 1 rather than 0.
- `restrictTo` now works with any `Comparable` value, not just `Number`.
- `CliktCommand.main` now accepts `Array<out String>`, not just `Array<String>`.

### Fixed
- Fixed option values being reset when calling multiple subcommands with `allowMultipleSubcommands=true` ([#190](https://github.com/ajalt/clikt/issues/190))
Expand Down
Expand Up @@ -295,7 +295,7 @@ abstract class CliktCommand(
}
}

fun main(argv: Array<String>) = main(argv.asList())
fun main(argv: Array<out String>) = main(argv.asList())

/**
* Perform actions after parsing is complete and this command is invoked.
Expand Down