mirror of
https://github.com/go-task/task.git
synced 2025-06-08 23:56:21 +02:00
fix: remote prompt (#1487)
This commit is contained in:
parent
6682489967
commit
870c07eafb
@ -17,11 +17,11 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
taskfileUntrustedPrompt = `The task you are attempting to run depends on the remote Taskfile at %q.
|
taskfileUntrustedPrompt = `The task you are attempting to run depends on the remote Taskfile at %q.
|
||||||
--- Make sure you trust the source of this Taskfile before continuing ---
|
--- Make sure you trust the source of this Taskfile before continuing ---
|
||||||
Continue?`
|
Continue?`
|
||||||
taskfileChangedPrompt = `The Taskfile at %q has changed since you last used it!
|
taskfileChangedPrompt = `The Taskfile at %q has changed since you last used it!
|
||||||
--- Make sure you trust the source of this Taskfile before continuing ---
|
--- Make sure you trust the source of this Taskfile before continuing ---
|
||||||
Continue?`
|
Continue?`
|
||||||
)
|
)
|
||||||
|
|
||||||
// Read reads a Read for a given directory
|
// Read reads a Read for a given directory
|
||||||
@ -238,7 +238,7 @@ func readTaskfile(
|
|||||||
// If there is a cached hash, but it doesn't match the expected hash, prompt the user to continue
|
// 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())
|
prompt = fmt.Sprintf(taskfileChangedPrompt, node.Location())
|
||||||
}
|
}
|
||||||
if prompt == "" {
|
if prompt != "" {
|
||||||
if err := l.Prompt(logger.Yellow, prompt, "n", "y", "yes"); err != nil {
|
if err := l.Prompt(logger.Yellow, prompt, "n", "y", "yes"); err != nil {
|
||||||
return nil, &errors.TaskfileNotTrustedError{URI: node.Location()}
|
return nil, &errors.TaskfileNotTrustedError{URI: node.Location()}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user