aboutsummaryrefslogtreecommitdiffstats
path: root/context.go
diff options
context:
space:
mode:
authorDan Willemsen <dan@danw.org>2018-02-26 14:10:21 -0800
committerGitHub <noreply@github.com>2018-02-26 14:10:21 -0800
commit77dc4de53e0fe30ad27a340f00868b014b41d2eb (patch)
tree00b657549ffc465ec8f5dc1502a4ca06778a85eb /context.go
parentcd3b7aed33c64925b4771e9c6ed160b4e1042c61 (diff)
parentb6c90239d601e7903028e0561ba601bc55fcfcbe (diff)
downloadandroid_build_blueprint-77dc4de53e0fe30ad27a340f00868b014b41d2eb.tar.gz
android_build_blueprint-77dc4de53e0fe30ad27a340f00868b014b41d2eb.tar.bz2
android_build_blueprint-77dc4de53e0fe30ad27a340f00868b014b41d2eb.zip
Merge pull request #200 from danw/glob_dirs
Append / to directories in Glob results
Diffstat (limited to 'context.go')
-rw-r--r--context.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/context.go b/context.go
index 2051365..ebe4e12 100644
--- a/context.go
+++ b/context.go
@@ -1017,6 +1017,12 @@ func (c *Context) findBuildBlueprints(dir string, build []string,
}
for _, foundBlueprints := range matches {
+ if strings.HasSuffix(foundBlueprints, "/") {
+ errs = append(errs, &BlueprintError{
+ Err: fmt.Errorf("%q: is a directory", foundBlueprints),
+ Pos: buildPos,
+ })
+ }
blueprints = append(blueprints, foundBlueprints)
}
}
@@ -1053,6 +1059,12 @@ func (c *Context) findSubdirBlueprints(dir string, subdirs []string, subdirsPos
}
for _, subBlueprints := range matches {
+ if strings.HasSuffix(subBlueprints, "/") {
+ errs = append(errs, &BlueprintError{
+ Err: fmt.Errorf("%q: is a directory", subBlueprints),
+ Pos: subdirsPos,
+ })
+ }
blueprints = append(blueprints, subBlueprints)
}
}