Skip to content

How to skip warning prompts when calling another task? #2276

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

Open
thetillhoff opened this issue May 29, 2025 · 1 comment
Open

How to skip warning prompts when calling another task? #2276

thetillhoff opened this issue May 29, 2025 · 1 comment
Labels
state: awaiting response Waiting for issue author to respond.

Comments

@thetillhoff
Copy link

Description

In the docs, it's stated that a prompt can be skipped with --yes.
Is this also possible when calling another task with task: taskname?
If yes, how?

Version

3.43.3

Operating system

macOS

Experiments Enabled

No response

Example Taskfile

# https://taskfile.dev

version: '3'

tasks:
  foo:
    cmds:
      - for:
          var: CLI_ARGS
        task: bar
        vars:
          CLI_ARGS: '{{ .ITEM }}'

  bar:
    internal: true
    prompt: Are you sure?
    cmds:
      - echo 'Hello world'
    vars:
      CLI_ARGS: '{{ .CLI_ARGS }}'
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label May 29, 2025
@vmaerten
Copy link
Member

vmaerten commented May 31, 2025

Hello !
You can skip all prompts with --yes (-y), but you cannot skip only a specific prompt when calling another task.

In our example you can do this :

task foo -y -- args
Are you sure? [assuming yes]
task: [bar] echo 'Hello world'
Hello world

@vmaerten vmaerten added state: awaiting response Waiting for issue author to respond. and removed state: needs triage Waiting to be triaged by a maintainer. labels May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: awaiting response Waiting for issue author to respond.
Projects
None yet
Development

No branches or pull requests

3 participants