Disallow OUT_DIR on the command line
By the time we do argument parsing, we've already written to $OUT_DIR or the default, so don't allow overriding the output directory on the command line. Test: m OUT_DIR=newdir Change-Id: I6f8c07cbef3a71d393b766dc5a01ae9c3df8631c
This commit is contained in:
@@ -517,6 +517,9 @@ func (c *configImpl) parseArgs(ctx Context, args []string) {
|
||||
ctx.Fatalln("Unknown option:", arg)
|
||||
}
|
||||
} else if k, v, ok := decodeKeyValue(arg); ok && len(k) > 0 {
|
||||
if k == "OUT_DIR" {
|
||||
ctx.Fatalln("OUT_DIR may only be set in the environment, not as a command line option.")
|
||||
}
|
||||
c.environ.Set(k, v)
|
||||
} else if arg == "dist" {
|
||||
c.dist = true
|
||||
|
Reference in New Issue
Block a user