Skip to content

Commit

Permalink
filepath.Rel may fail. Sticking on absolute path comparison
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Fissore <[email protected]>
  • Loading branch information
Federico Fissore committed Sep 15, 2015
1 parent 05187cd commit 60b69af
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ func (s *FailIfBuildpathEqualsSketchPath) Run(context map[string]interface{}) er
}
sketchPath = filepath.Dir(sketchPath)

rel, err := filepath.Rel(buildPath, sketchPath)
if err != nil {
return utils.WrapError(err)
}

if rel == "." {
if buildPath == sketchPath {
return utils.Errorf(context, "Sketch cannot be located in build path. Please specify a different build path")
}

Expand Down

0 comments on commit 60b69af

Please sign in to comment.