mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-13 05:23:51 -06:00
fix: hide host paths in probe logs and errors
MAME logs the folder above the content's ("Parent path"), which no
place named, and a pack probe kept core_probe's traceback with the
checkout spelled out. The first is written <content>/.., the second
<repo>, <dest> and <work>, replaced before the error is cut.
This commit is contained in:
1 parent
0b36d77071
commit
9d37c46bb3
3 files changed
+29
-2
No files matched your search
@@ -508,7 +508,13 @@ def core_probe(argv: list[str], staged: set[str], layout: Layout, work: Path) ->
|
||||
record = json.loads(proc.stdout)
|
||||
except ValueError:
|
||||
record = None
|
||||
return proc.returncode, record, proc.stderr.strip()[-1500:]
|
||||
# A traceback spells the checkout and the scratch folders: a record read
|
||||
# on another machine names them by role.
|
||||
places = [(str(work), "<work>"), (str(layout.root), "<dest>"), (str(ROOT), "<repo>")]
|
||||
error = proc.stderr.strip()
|
||||
for prefix, name in sorted(places, key=lambda place: -len(place[0])):
|
||||
error = error.replace(prefix, name)
|
||||
return proc.returncode, record, error[-1500:]
|
||||
|
||||
|
||||
def probe_argv(core: dict, choice: CoreChoice, content: campaign.Content, load: Path,
|
||||
|
||||
Reference in new issue
Block a user