mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 12:28:51 -06:00
fix: resolve the remote once, in main
This commit is contained in:
1 parent
4cb82adce3
commit
5436a45d4a
20 files changed
+331
-170
No files matched your search
+12
-1
@@ -31,6 +31,7 @@ from installer.network import _RAW_ERRORS, install_bounded_opener
|
||||
from installer.offline import LOCAL, OFFLINE_FLAG_VALUE, offline_named
|
||||
from installer.platforms import AVAILABLE_PLATFORMS, TARGET_PLATFORMS, _name_key, display_name, refuse_name
|
||||
from installer.regions import resolve_regions
|
||||
from installer.remote import remote_from_env, remote_in_use
|
||||
from installer.removal import run_backups, run_delete_backup, run_removal
|
||||
from installer.run import _install
|
||||
from installer.tui_routes import TUI_LIST_ENV, TUI_RECORD_ENV, line_mode_reason, plain_requested, tui_blocker
|
||||
@@ -303,7 +304,17 @@ def _main_dispatch(args: argparse.Namespace) -> None:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Entry point."""
|
||||
"""Entry point: the remote resolved once, then the run."""
|
||||
try:
|
||||
remote = remote_from_env()
|
||||
except ValueError as exc:
|
||||
print(f"Error: {exc}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
with remote_in_use(remote):
|
||||
_main_run()
|
||||
|
||||
|
||||
def _main_run() -> None:
|
||||
_INVOCATION.os_type = detect_os()
|
||||
parser = build_parser()
|
||||
args = parser.parse_args()
|
||||
|
||||
Reference in new issue
Block a user