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

Better error message when etc/spec.cli doesn't contains a commands key #44

Open
roman opened this issue Jul 5, 2018 · 0 comments
Open
Labels

Comments

@roman
Copy link
Owner

roman commented Jul 5, 2018

Currently, when we have a config spec like the following:

etc/cli:
  desc: "Some Desc"
  header: "Some Header"
  commands:
    run:
      desc: "some desc"
      header: "some header"

etc/entries:
  username:
    etc/spec:
      default: "etc-user"
      cli:
        input: "option"
        short: "u"  

It reports an error: CommandKeyMissing, when instead it should report:

ERROR - Invalid Configuration Spec:

  Entry `etc/entries.username.etc/spec.cli` does not contain a `commands` key, you may want to add one like the following:

  > etc/entries:
  >   ...
  >   username:
  >     etc/spec:
  >       ...
  >       cli:
  >          commands:
  >          - run

  Also, make sure you use `resolveCommandCli` instead of `resolvePureCli`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant