Skip to content

Commit

Permalink
handle nil dir as ok
Browse files Browse the repository at this point in the history
  • Loading branch information
bfoley13 committed Oct 8, 2024
1 parent 5712bc8 commit 58f9b6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/handlers/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func (t *Template) validate() error {
func generateTemplate(template *Template) error {
log.Infof("template : %v | %v", template, template.Config)
err := fs.WalkDir(template.templateFiles, template.src, func(path string, d fs.DirEntry, err error) error {
if d == nil {
log.Infof("dir is nil at path: %s", path)
return nil
}

log.Infof("template path: %s | %v", path, d)
if d.IsDir() {
return template.templateWriter.EnsureDirectory(strings.Replace(path, template.src, template.dest, 1))
Expand Down

0 comments on commit 58f9b6b

Please sign in to comment.