Dist module_paths/files.db

Help debugging finder issues by disting module_paths/files.db for
later analysis.

Bug: 157656545
Test: treehugger
Change-Id: Idfa4cffe7ef724b399a2667efd487f9c3c76bb6b
diff --git a/ui/build/finder.go b/ui/build/finder.go
index 6786337..c019ea2 100644
--- a/ui/build/finder.go
+++ b/ui/build/finder.go
@@ -126,6 +126,11 @@
 	if err != nil {
 		ctx.Fatalf("Could not find modules: %v", err)
 	}
+
+	if config.Dist() {
+		f.WaitForDbDump()
+		distFile(ctx, config, f.DbPath, "module_paths")
+	}
 }
 
 func dumpListToFile(ctx Context, config Config, list []string, filePath string) (err error) {