Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #60 from rebuy-de/ignore-empty-files
Browse files Browse the repository at this point in the history
ignore empty files
svenwltr authored Jul 4, 2017
2 parents 16eed4c + 33769a9 commit 0e40c67
Showing 2 changed files with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/api/render.go
Original file line number Diff line number Diff line change
@@ -39,6 +39,13 @@ func (app *App) Render(fetched *FetchResult) ([]runtime.Object, error) {
continue
}

if strings.TrimSpace(data) == "" {
log.WithFields(log.Fields{
"Name": name,
}).Debug("Ignoring empty file.")
continue
}

obj, _, err := decode([]byte(data), nil, nil)
if err != nil {
return nil, errors.Wrapf(err, "unable to decode file '%s'", name)
Empty file.

0 comments on commit 0e40c67

Please sign in to comment.