go-task/task · error
no continue values provided
Error message
no continue values provided
What it means
Raised inside Logger.Prompt when it is invoked with an empty continueValues slice. The prompt renders its accepted answers as '[yes/no]' from continueValues (first entry shown lowercase as the accept key, defaultValue shown uppercase as default), so calling it with no continue values would produce a meaningless/broken prompt and the method fails fast with this error.
Source
Thrown at internal/logger/logger.go:200
}
}
func (l *Logger) Warnf(message string, args ...any) {
l.Errf(Yellow, message, args...)
}
func (l *Logger) Prompt(color Color, prompt string, defaultValue string, continueValues ...string) error {
if l.AssumeYes {
l.Outf(color, "%s [assuming yes]\n", prompt)
return nil
}
if !l.AssumeTerm && !term.IsTerminal() {
return ErrNoTerminal
}
if len(continueValues) == 0 {
return errors.New("no continue values provided")
}
l.Outf(color, "%s [%s/%s]: ", prompt, strings.ToLower(continueValues[0]), strings.ToUpper(defaultValue))
reader := bufio.NewReader(l.Stdin)
input, err := reader.ReadString('\n')
if err != nil {
return err
}
input = strings.TrimSpace(strings.ToLower(input))
if !slices.Contains(continueValues, input) {
return ErrPromptCancelled
}
return nil
}
View on GitHub (pinned to 385e5ad92a)
Solutions
- Pass at least one continue value, e.g. logger.Prompt(color, prompt, "n", "y", "yes")
- Check any custom wrapper around Prompt to ensure it forwards the variadic continueValues args
- If this comes from a fork/patched build, compare against upstream Prompt call sites to restore missing arguments
Example fix
// before ans, err := l.Prompt(logger.Yellow, "Proceed?") // after ans, err := l.Prompt(logger.Yellow, "Proceed?", "n", "y", "yes")
Defensive patterns
Strategy: validation
Validate before calling
if len(continueValues) == 0 {
return errors.New("prompt requires at least one continue value")
}
ans, err := l.Prompt(color, prompt, continueValues...) Try / catch
if err != nil {
if strings.Contains(err.Error(), "no continue values provided") {
// caller bug: supply default values and retry
ans, err = l.Prompt(color, prompt, "n", "y", "yes")
}
return err
} Prevention
- Always call Prompt with explicit continue values following upstream convention: Prompt(color, prompt, defaultValue, acceptValues...)
- Wrap Prompt in a project-local helper that supplies sane defaults instead of calling it ad hoc
- Add a unit test for any custom wrapper covering the zero-args case
- Mirror upstream call sites (logger.Prompt(logger.Yellow, p, "n", "y", "yes")) when refactoring
When it happens
Trigger: Calling Logger.Prompt (or code paths that forward to it) with zero variadic continueValues arguments, e.g. l.Prompt(color, "Continue?") or l.Prompt(color, "Continue?", "y") with no further args — typically from custom executor code or library modifications, not from normal CLI usage.
Common situations: Custom tooling built on the task library calling the logger's Prompt API directly; refactors that accidentally drop the variadic arguments; programmatic task execution wrappers. Normal users of the task CLI never see it because built-in prompts always pass values.
Related errors
- task: You can't set both --download and --offline flags
- task: You can't set both --download and --clear-cache flags
- task: You can't set both --global and --dir
- task: You can't set --output-group-begin without --output=gr
- task: You can't set --output-group-end without --output=grou
AI-assisted analysis of go-task/task@385e5ad92a (2026-09-05).
Data as JSON: /api/errors/0e4fd742495fb054.
Report an issue: GitHub.