mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 20:38:52 -06:00
refactor: one refusal path to stderr and events
Library functions printed their refusal and exited, each deciding on its own whether --events got an error event. --cores-dir, --installed-cores with no core, a list without system_cores or standalone_builds, a pack that cannot be used, a board list a run needs and --dest alone beside two setups ended on code 1 with no reason in the stream. They now raise Refusal (installer/refusal.py), carrying the stage, the reason, the platform, the lines and the code. The install, an action framed by events and main report it once: the error event, then the same lines on stderr, so the text and exit codes stay as they were.
This commit is contained in:
1 parent
ced68a9135
commit
eba627aa89
20 files changed
+542
-402
No files matched your search
@@ -465,7 +465,7 @@ def _check_run_cores(run: _InstallRun) -> None:
|
||||
for plat_name, bios_path in [] if run.packing else run.platforms:
|
||||
if plat_name in CORE_PLATFORMS:
|
||||
if args.cores_dir:
|
||||
_check_cores_dir(args.cores_dir)
|
||||
_check_cores_dir(args.cores_dir, plat_name)
|
||||
searched = [args.cores_dir] if args.cores_dir else core_dirs(plat_name, bios_path)
|
||||
run.cores_found[(plat_name, bios_path)] = installed_cores(searched)
|
||||
run.cores_searched[(plat_name, bios_path)] = searched
|
||||
|
||||
Reference in new issue
Block a user