-
-
Notifications
You must be signed in to change notification settings - Fork 763
Closed
Labels
Description
From the docs I expect to be able to use requires and wildcard arguments together to limit the possible wildcards. Below is an example, following from the initial wildcard PR #1489:
---
version: "3"
tasks:
start-*:
desc: "Starts a service. Options: web, db"
vars:
SERVICE: "{{ index .MATCH 0 }}"
cmds:
- echo "Starting {{.SERVICE}}"
requires:
vars:
- name: SERVICE
enum: ["web", "db"]And the output:
❯ task start-a
task: Task "start-*" cancelled because it is missing required variables: SERVICE❯ task start-web
task: Task "start-*" cancelled because it is missing required variables: SERVICERemoving the requires block results in the following (correct) output:
❯ task start-web
task: [start-*] echo "Starting web"
Starting webI would expect requires to validate that SERVICE is in ["web", "db"]. If this assumption or my implementation is incorrect, please forgive me.
- Task version:
Task version: 3.40.1 ()- Operating system:
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224- Experiments enabled: none