From 9ea75a9f59931e2d4dc9272a78996c21d2e3b6b5 Mon Sep 17 00:00:00 2001 From: Jonas Rutishauser Date: Fri, 4 Oct 2019 19:08:39 +0200 Subject: [PATCH] Use same output format for hooks as for manifest Signed-off-by: Jonas Rutishauser --- cmd/helm/get_hooks.go | 2 +- cmd/helm/testdata/output/get-hooks.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/helm/get_hooks.go b/cmd/helm/get_hooks.go index 4ec48bb2c..0c50c8833 100644 --- a/cmd/helm/get_hooks.go +++ b/cmd/helm/get_hooks.go @@ -46,7 +46,7 @@ func newGetHooksCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { return err } for _, hook := range res.Hooks { - fmt.Fprintf(out, "---\n# %s\n%s", hook.Name, hook.Manifest) + fmt.Fprintf(out, "---\n# Source: %s\n%s\n", hook.Path, hook.Manifest) } return nil }, diff --git a/cmd/helm/testdata/output/get-hooks.txt b/cmd/helm/testdata/output/get-hooks.txt index e8ba823d6..81e87b1f1 100644 --- a/cmd/helm/testdata/output/get-hooks.txt +++ b/cmd/helm/testdata/output/get-hooks.txt @@ -1,7 +1,8 @@ --- -# pre-install-hook +# Source: pre-install-hook.yaml apiVersion: v1 kind: Job metadata: annotations: "helm.sh/hook": pre-install +