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 { ...@@ -171,17 +171,18 @@ func (file *manifestFile) sort(result *result) error {
DeletePolicies: []release.Hook_DeletePolicy{}, DeletePolicies: []release.Hook_DeletePolicy{},
} }
isKnownHook := false isUnknownHook := false
for _, hookType := range strings.Split(hookTypes, ",") { for _, hookType := range strings.Split(hookTypes, ",") {
hookType = strings.ToLower(strings.TrimSpace(hookType)) hookType = strings.ToLower(strings.TrimSpace(hookType))
e, ok := events[hookType] e, ok := events[hookType]
if ok { if !ok {
isKnownHook = true isUnknownHook = true
h.Events = append(h.Events, e) break
} }
h.Events = append(h.Events, e)
} }
if !isKnownHook { if isUnknownHook {
log.Printf("info: skipping unknown hook: %q", hookTypes) log.Printf("info: skipping unknown hook: %q", hookTypes)
continue 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