mirror of
https://github.com/go-task/task.git
synced 2025-06-23 00:38:19 +02:00
feat: error when multiple wildcard matches are found
This commit is contained in:
@ -65,15 +65,15 @@ func (err *TaskInternalError) Code() int {
|
||||
return CodeTaskInternal
|
||||
}
|
||||
|
||||
// TaskNameConflictError is returned when multiple tasks with the same name or
|
||||
// TaskNameConflictError is returned when multiple tasks with a matching name or
|
||||
// alias are found.
|
||||
type TaskNameConflictError struct {
|
||||
AliasName string
|
||||
Call string
|
||||
TaskNames []string
|
||||
}
|
||||
|
||||
func (err *TaskNameConflictError) Error() string {
|
||||
return fmt.Sprintf(`task: Multiple tasks (%s) with alias %q found`, strings.Join(err.TaskNames, ", "), err.AliasName)
|
||||
return fmt.Sprintf(`task: Found multiple tasks (%s) that match %q`, strings.Join(err.TaskNames, ", "), err.Call)
|
||||
}
|
||||
|
||||
func (err *TaskNameConflictError) Code() int {
|
||||
|
Reference in New Issue
Block a user