diff --git a/pkg/ship/kustomize.go b/pkg/ship/kustomize.go index 73f009bc5..402e8af57 100644 --- a/pkg/ship/kustomize.go +++ b/pkg/ship/kustomize.go @@ -25,7 +25,7 @@ func (s *Ship) Kustomize(ctx context.Context) error { helmChartPath := s.Viper.GetString("chart") helmChartMetadata, err := s.Resolver.ResolveChartMetadata(context.Background(), helmChartPath) if err != nil { - errors.Wrapf(err, "resolve helm metadata for %s", helmChartPath) + return errors.Wrapf(err, "resolve helm metadata for %s", helmChartPath) } release := &api.Release{ diff --git a/pkg/specs/chart.go b/pkg/specs/chart.go index 8187b5f77..6fa94a996 100644 --- a/pkg/specs/chart.go +++ b/pkg/specs/chart.go @@ -68,7 +68,7 @@ func (g *GithubClient) GetChartAndReadmeContents(ctx context.Context, chartURLSt } } - return g.getAllFiles(ctx, owner, repo, path, "") + return g.getAllFiles(ctx, owner, repo, path, "/") } func (g *GithubClient) getAllFiles(ctx context.Context, owner string, repo string, basePath string, filePath string) error { @@ -77,7 +77,7 @@ func (g *GithubClient) getAllFiles(ctx context.Context, owner string, repo strin debug.Log("event", "getContents", "path", basePath) _, dirContent, _, err := g.client.Repositories.GetContents(ctx, owner, repo, basePath, &github.RepositoryContentGetOptions{}) if err != nil { - return err + return errors.Wrapf(err, "initial get contents of owner - %s repo - %s", owner, repo) } for _, gitContent := range dirContent { @@ -143,7 +143,7 @@ func (r *Resolver) ResolveChartMetadata(ctx context.Context, path string) (api.H var md api.HelmChartMetadata err := r.GithubClient.GetChartAndReadmeContents(ctx, path) if err != nil { - return api.HelmChartMetadata{}, err + return api.HelmChartMetadata{}, errors.Wrapf(err, "get chart and read me at %s", path) } localChartPath := filepath.Join(constants.KustomizeHelmPath, "Chart.yaml")