fix: ask no standalone list in an offline run

This commit is contained in:
Abdessamad Derraz committed 2026-10-24 03:57:33 +02:00
1 parent 2d9db59c73
commit d24adf9592
2 files changed
+27

No files matched your search

+5
View File
@@ -6011,6 +6011,11 @@ def _install_standalone_folders(
False when this machine has none, the run then going on to the platform
question or hint.
"""
if offline_requested():
# Their folders are named by file lists this run cannot fetch: the
# first refusal ended an --offline run that asked nothing of EmuDeck
# on "No file list for emudeck".
return False
manifests = []
for plat in STANDALONE_SOURCES:
manifests.append(fetch_manifest(plat))
+22
View File
@@ -1166,6 +1166,28 @@ class ADetectedClosedFolderSaysWhereItCameFrom(unittest.TestCase):
_source_of(install._install))
class OfflineWithNothingFound(unittest.TestCase):
"""An --offline run on a machine with nothing installed ended on "No
file list for emudeck", a platform nobody asked about: the standalone
folders are named by file lists that run cannot fetch."""
def test_the_hint_is_given_and_no_other_platform_named(self):
with FakeRepository() as repo:
home = repo.root / "home"
home.mkdir()
env = {**repo.env(), "HOME": str(home), "XDG_CONFIG_HOME": str(home / ".config"),
"RETROBIOS_OS": "linux"}
proc = subprocess.run(
[sys.executable, str(REPO_ROOT / "install.py"), "--offline", "--check",
"--no-input"],
env=env, capture_output=True, text=True, timeout=60,
stdin=subprocess.DEVNULL)
said = proc.stdout + proc.stderr
self.assertEqual(proc.returncode, 1, said)
self.assertNotIn("emudeck", said.lower())
self.assertIn("Use --platform and --dest", said)
def _source_of(function) -> str:
import inspect