diff --git a/install.ps1 b/install.ps1 index be417686..9edaabee 100644 --- a/install.ps1 +++ b/install.ps1 @@ -11,7 +11,7 @@ $ErrorActionPreference = "Stop" $defaultInstallUrl = "https://raw.githubusercontent.com/Abdess/retrobios/main/install.py" - $defaultInstallSha256 = "d32af09905abef095c8e5e8fa832fbc76d1556e9cd099b81227d68d1d66d2915" + $defaultInstallSha256 = "8cfe5cb80b8df7f8c2736cfe5855a768c3eacad6ebf5bfd7336b3b4f5a4d5d76" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index 48164438..bf8b2288 100644 --- a/install.py +++ b/install.py @@ -5603,7 +5603,8 @@ def _choose_platform(title: str, default: str = "") -> str: def _prompt_manual_platform(os_type: str) -> list[tuple[str, Path]]: """Ask for a platform and a BIOS directory when nothing was detected.""" - plat = _choose_platform("Choose the platform to install for:") + plat = _choose_platform("No supported platform found here. Choose the one to " + "install for:", "retroarch") default_dest = _default_dest(os_type, plat) raw = "" while not raw: diff --git a/install.sh b/install.sh index b638b333..405fa690 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ esac TEMP_INSTALLER="" TEMP_DIRECTORY="" DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/install.py" -DEFAULT_INSTALL_SHA256="d32af09905abef095c8e5e8fa832fbc76d1556e9cd099b81227d68d1d66d2915" +DEFAULT_INSTALL_SHA256="8cfe5cb80b8df7f8c2736cfe5855a768c3eacad6ebf5bfd7336b3b4f5a4d5d76" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/tests/test_install.py b/tests/test_install.py index 27129751..14f27fc4 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1808,6 +1808,16 @@ class TestManualPlatformPrompt(unittest.TestCase): chosen, [("retroarch", Path.home() / ".config" / "retroarch" / "system")] ) + def test_enter_takes_retroarch_as_the_dest_menu_does(self): + """The --dest menu offered `[Enter for RetroArch]` and this one, the + same list, had no default.""" + answers = iter(["", ""]) + out = io.StringIO() + with unittest.mock.patch("builtins.input", lambda _prompt="": next(answers)), \ + contextlib.redirect_stdout(out): + chosen = install._prompt_manual_platform("linux") + self.assertEqual(chosen[0][0], "retroarch") + def test_name_and_explicit_directory(self): answers = iter(["batocera", "~/my bios"]) with unittest.mock.patch("builtins.input", lambda _prompt="": next(answers)):