Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6dfe30a5 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

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
parent c57d39ca
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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