1
0
mirror of https://github.com/go-task/task.git synced 2025-08-08 22:36:57 +02:00

fix: prompt check shouldn't run if dry flag is true

This commit is contained in:
Pete Davison
2024-05-13 13:37:58 +00:00
committed by Andrey Nering
parent 3e5cd6cdfd
commit 7535467f45

View File

@@ -228,7 +228,7 @@ func (e *Executor) RunTask(ctx context.Context, call *ast.Call) error {
}
}
if t.Prompt != "" {
if t.Prompt != "" && !e.Dry {
if err := e.Logger.Prompt(logger.Yellow, t.Prompt, "n", "y", "yes"); errors.Is(err, logger.ErrNoTerminal) {
return &errors.TaskCancelledNoTerminalError{TaskName: call.Task}
} else if errors.Is(err, logger.ErrPromptCancelled) {