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

Commit abc56d4f authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Fix `dist` if $DIST_DIR/logs doesn't exist

Bug: 35886901
Test: rm -rf out; m -j dist
Change-Id: I1008d9eef884d60766e35a543e72df5df01d61de
parent 469a18aa
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -72,9 +72,10 @@ func main() {
	build.SetupOutDir(buildCtx, config)

	if config.Dist() {
		os.MkdirAll(config.DistDir(), 0777)
		log.SetOutput(filepath.Join(config.DistDir(), "logs", "soong.log"))
		trace.SetOutput(filepath.Join(config.DistDir(), "logs", "build.trace"))
		logsDir := filepath.Join(config.DistDir(), "logs")
		os.MkdirAll(logsDir, 0777)
		log.SetOutput(filepath.Join(logsDir, "soong.log"))
		trace.SetOutput(filepath.Join(logsDir, "build.trace"))
	} else {
		log.SetOutput(filepath.Join(config.OutDir(), "soong.log"))
		trace.SetOutput(filepath.Join(config.OutDir(), "build.trace"))