Fix reference unknown variable 'file'

Also log the rspfile for easier debugging.

Bug: 318434287
Test: Presubmits
Change-Id: I4ef6f2065a39ce6fef816f7241d079149043ffd0
This commit is contained in:
Cole Faust 2024-05-04 18:09:43 -07:00
parent 01bd5b1ddf
commit a5a1fa1d09

View file

@ -79,7 +79,7 @@ def main():
elif src.endswith('.kt'):
f.write(' <sources path="%s"/>\n' % path)
else:
raise RuntimeError('unknown source file type %s' % file)
raise RuntimeError(f'unknown source file type {src} from rspfile {rsp_file}')
for rsp_file in args.common_srcs:
for src in NinjaRspFileReader(rsp_file):