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

Support for conditional requirement of options #65

Open
Hobart2967 opened this issue Jan 22, 2020 · 0 comments
Open

Support for conditional requirement of options #65

Hobart2967 opened this issue Jan 22, 2020 · 0 comments

Comments

@Hobart2967
Copy link

Hobart2967 commented Jan 22, 2020

Is your feature request related to a problem? Please describe.
Depending on the options and args given I'd like to require additional options. For example, I have a build task that requires an option "name" in some cases, but not in all.

The structure for "when" in tasks is great already and looks suitable to the requiring of options, too.

Describe the solution you'd like

# ...
  build:
    usage: Builds a part of this product 
    args:
      artifact:
        usage: "Type of artifact to build"
        values:
          - app
          - lib
    options:
      name:
        usage: Name of the target to build
        required:
          when:
            - { artifact: 'lib' }
# ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant