Make pathmod give absolute paths
This was broken when pathmod was turned into a standalone script.
Bug: 340648588
Test: gomod frameworks-minus-apex from build/soong
Change-Id: Ibd5eaf2c29d232c1a7da432723f7c6b6fa8bce83
diff --git a/bin/pathmod b/bin/pathmod
index 90d84b5..f5560ba 100755
--- a/bin/pathmod
+++ b/bin/pathmod
@@ -31,7 +31,8 @@
sys.stderr.write("usage: pathmod <module>\n")
sys.exit(1)
- print(modinfo.GetModule(modinfo.ReadModuleInfo(), argv[1])['path'][0])
+ path = modinfo.GetModule(modinfo.ReadModuleInfo(), argv[1])['path'][0]
+ print(os.path.join(os.getenv("ANDROID_BUILD_TOP", ""), path))
if __name__ == "__main__":
main(sys.argv)