Skip to content

Commit

Permalink
Check if variantFolder exists and is a folder (#359)
Browse files Browse the repository at this point in the history
Fixes #126
  • Loading branch information
facchinm committed Aug 27, 2019
1 parent 8f52678 commit f9ebd6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions legacy/builder/phases/core_builder.go
Expand Up @@ -78,15 +78,15 @@ func compileCore(ctx *types.Context, buildPath *paths.Path, buildCachePath *path

includes := []string{}
includes = append(includes, coreFolder.String())
if variantFolder != nil {
if variantFolder != nil && variantFolder.IsDir() {
includes = append(includes, variantFolder.String())
}
includes = utils.Map(includes, utils.WrapWithHyphenI)

var err error

variantObjectFiles := paths.NewPathList()
if variantFolder != nil {
if variantFolder != nil && variantFolder.IsDir() {
variantObjectFiles, err = builder_utils.CompileFiles(ctx, variantFolder, true, buildPath, buildProperties, includes)
if err != nil {
return nil, nil, i18n.WrapError(err)
Expand Down

0 comments on commit f9ebd6b

Please sign in to comment.