mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 06:18:51 -06:00
fix: let core.upstream refuse requests offline
RETROBIOS_OFFLINE was read by six callers and never by the network gateway: a caller that did not pass offline=True sent the request, untokened. core.offline holds the rule, open_retrying refuses with OfflineError and the cached reads answer as an offline run. The callers read the same predicate, and the tests that fake the network clear the variable for themselves (tests.ONLINE).
This commit is contained in:
1 parent
409cc843f9
commit
83e810d1b3
23 files changed
+124
-17
No files matched your search
@@ -3,12 +3,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from contextlib import contextmanager
|
||||
from pathlib import Path
|
||||
|
||||
from core.offline import run_is_offline
|
||||
from core.paths import EMULATORS_DIR, REPO_ROOT
|
||||
from model.profiles import load_emulator_profiles
|
||||
|
||||
@@ -39,7 +39,7 @@ def refresh_source_paths(args: argparse.Namespace, written: set[str]) -> None:
|
||||
another tree prints the command for it instead of reducing the record
|
||||
to the trees that tree cites.
|
||||
"""
|
||||
if not written or args.dry_run or args.offline or os.environ.get("RETROBIOS_OFFLINE"):
|
||||
if not written or args.dry_run or run_is_offline(args.offline):
|
||||
return
|
||||
if Path(args.emulators_dir).resolve() != (REPO_ROOT / EMULATORS_DIR).resolve():
|
||||
print(
|
||||
|
||||
Reference in new issue
Block a user