superfaceai / cli

Let AI connect the APIs for you
https://superface.ai
MIT License
22 stars 4 forks source link

fix: checking of arguments #341

Closed Jakub-Vacek closed 1 year ago

Jakub-Vacek commented 1 year ago

Description

Fixes: https://github.com/superfaceai/cli/issues/340 Also fixes other commands with two positional arguments where one missing argument can lead to not relevant error message

Motivation and Context

Types of changes

Checklist:

Jakub-Vacek commented 1 year ago

Is it possible in OCLIF to trigger printout of the USAGE part of the command help msg?

Screenshot 2023-07-25 at 16 08 28

I think there is no easy way now. I tried to add function to our Command base class but all of relevant data lives on static side of classes and is accessible after parse. So I would need to prepare some function that takes instance of Command, picks data (args, descriptions etc.) and prints them to string.