fix(remote): do not display prompt if it's empty (#1634)

This commit is contained in:
Valentin Maerten
2024-05-05 17:10:32 +02:00
committed by GitHub
parent cd259a741f
commit 17f6e816d8

View File

@@ -242,7 +242,7 @@ func (r *Reader) readNode(node Node) (*ast.Taskfile, error) {
// If there is a cached hash, but it doesn't match the expected hash, prompt the user to continue
prompt = fmt.Sprintf(taskfileChangedPrompt, node.Location())
}
if prompt == "" {
if prompt != "" {
if err := r.logger.Prompt(logger.Yellow, prompt, "n", "y", "yes"); err != nil {
return nil, &errors.TaskfileNotTrustedError{URI: node.Location()}
}