checkHaveOnlyOneArg function
Implementation
void checkHaveOnlyOneArg({
required List<String> restArgs,
required String usage,
}) {
if (restArgs.isEmpty) {
throw UsageException('Command must have an argument', usage);
} else if (restArgs.length > 1) {
throw UsageException('Command must have only one argument', usage);
}
}