Merge "Replace $(call my-dir) with a string literal"

This commit is contained in:
Treehugger Robot
2022-03-22 03:24:47 +00:00
committed by Gerrit Code Review
3 changed files with 20 additions and 9 deletions

View File

@@ -1376,7 +1376,7 @@ func (p *myDirCallParser) parse(ctx *parseContext, node mkparser.Node, args *mkp
if !args.Empty() {
return ctx.newBadExpr(node, "my-dir function cannot have any arguments passed to it.")
}
return &variableRefExpr{ctx.addVariable("LOCAL_PATH"), true}
return &stringLiteralExpr{literal: filepath.Dir(ctx.script.mkFile)}
}
type isProductInListCallParser struct{}