Skip to content

Commit 60b69af

Browse files
author
Federico Fissore
committed
filepath.Rel may fail. Sticking on absolute path comparison
Signed-off-by: Federico Fissore <[email protected]>
1 parent 05187cd commit 60b69af

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: src/arduino.cc/builder/fail_if_buildpath_equals_sketchpath.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ func (s *FailIfBuildpathEqualsSketchPath) Run(context map[string]interface{}) er
5353
}
5454
sketchPath = filepath.Dir(sketchPath)
5555

56-
rel, err := filepath.Rel(buildPath, sketchPath)
57-
if err != nil {
58-
return utils.WrapError(err)
59-
}
60-
61-
if rel == "." {
56+
if buildPath == sketchPath {
6257
return utils.Errorf(context, "Sketch cannot be located in build path. Please specify a different build path")
6358
}
6459

0 commit comments

Comments
 (0)