Commit 608fd731 authored by DoctorZK's avatar DoctorZK

fix(tiller): fix a warning bug in hook annotation

parent 8befd50c
......@@ -171,17 +171,18 @@ func (file *manifestFile) sort(result *result) error {
DeletePolicies: []release.Hook_DeletePolicy{},
}
isKnownHook := false
isUnknownHook := false
for _, hookType := range strings.Split(hookTypes, ",") {
hookType = strings.ToLower(strings.TrimSpace(hookType))
e, ok := events[hookType]
if ok {
isKnownHook = true
h.Events = append(h.Events, e)
if !ok {
isUnknownHook = true
break
}
h.Events = append(h.Events, e)
}
if !isKnownHook {
if isUnknownHook {
log.Printf("info: skipping unknown hook: %q", hookTypes)
continue
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment