diff options
author | Dan Willemsen <dan@danw.org> | 2018-02-26 14:10:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 14:10:21 -0800 |
commit | 77dc4de53e0fe30ad27a340f00868b014b41d2eb (patch) | |
tree | 00b657549ffc465ec8f5dc1502a4ca06778a85eb /context.go | |
parent | cd3b7aed33c64925b4771e9c6ed160b4e1042c61 (diff) | |
parent | b6c90239d601e7903028e0561ba601bc55fcfcbe (diff) | |
download | android_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.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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) } } |