mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 17:21:49 -10:00
Port harness: read the log a Windows javac error names
named_logs only matched a Posix absolute path (`see /...log`), so on Windows horizon-prepare's "see C:\...\export.log" matched nothing and its javac errors were never shown. The pattern now takes either form. Co-Authored-By: Hermes Agent (Nous Research) <[email protected]>
This commit is contained in:
1 parent
b6c936f82b
commit
28e3286e40
1 file changed
+2
-1
@@ -96,7 +96,8 @@ def prepare_resources(root, version, store):
|
||||
def named_logs(output):
|
||||
"""The logs horizon-prepare's errors point to ("…; see /path/export.log"): its javac errors are there."""
|
||||
text = ""
|
||||
for name in sorted(set(re.findall(r"see (/\S+\.log)", output))):
|
||||
# A log path is absolute on every host: "/tmp/x.log" or "C:\tmp\x.log".
|
||||
for name in sorted(set(re.findall(r"see ((?:/|[A-Za-z]:[\\/])\S+\.log)", output))):
|
||||
path = Path(name)
|
||||
if path.is_file():
|
||||
text += path.read_text(errors="replace")[-(1 << 20):]
|
||||
|
||||
Reference in new issue
Block a user