Skip to content

Commit f9ebd6b

Browse files
authored
Check if variantFolder exists and is a folder (arduino#359)
Fixes arduino#126
1 parent 8f52678 commit f9ebd6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

legacy/builder/phases/core_builder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ func compileCore(ctx *types.Context, buildPath *paths.Path, buildCachePath *path
7878

7979
includes := []string{}
8080
includes = append(includes, coreFolder.String())
81-
if variantFolder != nil {
81+
if variantFolder != nil && variantFolder.IsDir() {
8282
includes = append(includes, variantFolder.String())
8383
}
8484
includes = utils.Map(includes, utils.WrapWithHyphenI)
8585

8686
var err error
8787

8888
variantObjectFiles := paths.NewPathList()
89-
if variantFolder != nil {
89+
if variantFolder != nil && variantFolder.IsDir() {
9090
variantObjectFiles, err = builder_utils.CompileFiles(ctx, variantFolder, true, buildPath, buildProperties, includes)
9191
if err != nil {
9292
return nil, nil, i18n.WrapError(err)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy