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:
committed by
Andrey Nering
parent
3e5cd6cdfd
commit
7535467f45
2
task.go
2
task.go
@@ -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) {
|
||||
|
Reference in New Issue
Block a user