diff --git a/install.ps1 b/install.ps1 index 3e38caf74..75033ba8b 100644 --- a/install.ps1 +++ b/install.ps1 @@ -16,7 +16,7 @@ # and Invoke-WebRequest throws on a cut transfer before the hash is read: # the site's build rewrites this line there (scripts/sitebootstrap.py). $mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." - $defaultInstallSha256 = "97cd447f646ffe259805b98bfbdc98b2d5c63acccd823480dadfe331005208f5" + $defaultInstallSha256 = "456a32e79668e125f2ebe573b549247210c59fed6389e78dc1482b57d3a36712" # The pin above refuses any changed byte: this cap only stops a body that # cannot be the installer (a sign-in portal's page) before it is hashed. $maximumInstallerBytes = 8MB diff --git a/install.py b/install.py index 0b4b1f26c..3bd093ddc 100644 --- a/install.py +++ b/install.py @@ -14245,17 +14245,21 @@ def build_parser() -> argparse.ArgumentParser: return parser +def say_raw_errors(verbose: bool) -> None: + """Each run says errors from its own options: a run with --verbose before + it in the same process left every later message with its raw cause.""" + if verbose: + _RAW_ERRORS.set() + else: + _RAW_ERRORS.clear() + + def main() -> None: """Entry point.""" _INVOCATION.os_type = detect_os() parser = build_parser() args = parser.parse_args() - # Each run says it from its own options: a run with --verbose before it - # in the same process left every later message with its raw cause. - if args.verbose: - _RAW_ERRORS.set() - else: - _RAW_ERRORS.clear() + say_raw_errors(args.verbose) if args.cores_dir: args.installed_cores = True if args.yes: diff --git a/install.sh b/install.sh index 1720bc469..a606cca06 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins # curl or wget stop on a cut transfer before the hash is read: the site's # build rewrites this line there (scripts/sitebootstrap.py). MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." -DEFAULT_INSTALL_SHA256="97cd447f646ffe259805b98bfbdc98b2d5c63acccd823480dadfe331005208f5" +DEFAULT_INSTALL_SHA256="456a32e79668e125f2ebe573b549247210c59fed6389e78dc1482b57d3a36712" # The pin above refuses any changed byte: this cap only stops a body that # cannot be the installer (a sign-in portal's page) before it is hashed. MAX_INSTALLER_BYTES=8388608 diff --git a/install/launchers/index.json b/install/launchers/index.json index cba1b71cb..8cee38296 100644 --- a/install/launchers/index.json +++ b/install/launchers/index.json @@ -27,8 +27,8 @@ { "dest": "roms/ports/retrobios/install.py", "repo_path": "install.py", - "size": 1162373, - "sha256": "97cd447f646ffe259805b98bfbdc98b2d5c63acccd823480dadfe331005208f5", + "size": 1162452, + "sha256": "456a32e79668e125f2ebe573b549247210c59fed6389e78dc1482b57d3a36712", "executable": false }, { @@ -71,8 +71,8 @@ "muos": { "archive": { "dest": "ARCHIVE/RetroBIOS.muxapp", - "size": 1215998, - "sha256": "996a6e24cc5e2d067d86f8f368313e8afd1ba17391b3c595cb8f72e73b208433" + "size": 1216077, + "sha256": "b9e623839a8cf71d929a860b53a6c4c82cbfde551151912e1aba0347532be965" }, "members": [ { @@ -92,8 +92,8 @@ { "name": "RetroBIOS/install.py", "repo_path": "install.py", - "size": 1162373, - "sha256": "97cd447f646ffe259805b98bfbdc98b2d5c63acccd823480dadfe331005208f5", + "size": 1162452, + "sha256": "456a32e79668e125f2ebe573b549247210c59fed6389e78dc1482b57d3a36712", "executable": false }, { @@ -166,8 +166,8 @@ { "dest": ".config/modules/retrobios/install.py", "repo_path": "install.py", - "size": 1162373, - "sha256": "97cd447f646ffe259805b98bfbdc98b2d5c63acccd823480dadfe331005208f5", + "size": 1162452, + "sha256": "456a32e79668e125f2ebe573b549247210c59fed6389e78dc1482b57d3a36712", "executable": false }, { diff --git a/tests/test_install.py b/tests/test_install.py index 60b12173f..b2a6d4734 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -7839,16 +7839,10 @@ class EachRunSaysErrorsFromItsOwnOptions(unittest.TestCase): in the same process ended its clock message with the raw SSL text.""" def test_a_run_without_verbose_clears_it(self): - install._RAW_ERRORS.set() self.addCleanup(install._RAW_ERRORS.clear) - with unittest.mock.patch.object(sys, "argv", - ["install.py", "--list-platforms", "--offline"]), \ - contextlib.redirect_stdout(io.StringIO()), \ - contextlib.redirect_stderr(io.StringIO()): - try: - install.main() - except SystemExit: - pass + install.say_raw_errors(True) + self.assertTrue(install._RAW_ERRORS.is_set()) + install.say_raw_errors(False) self.assertFalse(install._RAW_ERRORS.is_set())