grim/convey

Parents 056ca5e1a940
Children 6d9ae7a89eaf
If a task type has a / in it, don't attempt to see if it's a legacy task. #Fixed #169
--- a/loaders/convey/tasks.go Fri Feb 16 14:07:47 2018 -0600
+++ b/loaders/convey/tasks.go Fri Feb 16 22:06:21 2018 -0600
@@ -18,6 +18,7 @@
import (
"fmt"
+ "strings"
"github.com/aphistic/gomol"
"github.com/go-yaml/yaml"
@@ -98,7 +99,7 @@
if !ok {
// TODO remove when the old format for task types is removed.
// if deprecated tasks are disabled, just bomb out
- if disableDeprecated {
+ if disableDeprecated || strings.ContainsRune(rawType, '/') {
return nil, fmt.Errorf("task '%s' not found", rawType)
}
--- a/tests/tasks-types.yml Fri Feb 16 14:07:47 2018 -0600
+++ b/tests/tasks-types.yml Fri Feb 16 22:06:21 2018 -0600
@@ -44,6 +44,9 @@
script:
- echo "explicit-new"
+ explicit-new-unknown:
+ type: imaginary/type
+
plans:
default:
stages:
@@ -53,3 +56,6 @@
- implicit-type
- explicit-old
- explicit-new
+ - tasks:
+ - explicit-new-unknown
+