Disallow bp 'build' includes to reference other dirs
Bug: 65683273 Test: add 'build = ["sub/nope.bp"]' to an Android.bp; notice the error Change-Id: Ic0f171f283edda074f65a76029e660dfaab2504b
This commit is contained in:
parent
3c8c3346d2
commit
f23e36690e
1 changed files with 8 additions and 0 deletions
|
@ -954,6 +954,14 @@ func (c *Context) parseOne(rootDir, filename string, reader io.Reader,
|
|||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
for _, buildEntry := range build {
|
||||
if strings.Contains(buildEntry, "/") {
|
||||
errs = append(errs, &BlueprintError{
|
||||
Err: fmt.Errorf("illegal value %v. The '/' character is not permitted", buildEntry),
|
||||
Pos: buildPos,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
subBlueprintsName, _, err := getStringFromScope(scope, "subname")
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue