(
installer,
install_dir,
installer_input=None,
timeout=420,
check=True,
options: list | None = None,
)
| 276 | |
| 277 | |
| 278 | def _run_installer_sh( |
| 279 | installer, |
| 280 | install_dir, |
| 281 | installer_input=None, |
| 282 | timeout=420, |
| 283 | check=True, |
| 284 | options: list | None = None, |
| 285 | ): |
| 286 | if installer_input: |
| 287 | cmd = ["/bin/sh", installer] |
| 288 | else: |
| 289 | options = options or [] |
| 290 | cmd = ["/bin/sh"] |
| 291 | if CONSTRUCTOR_DEBUG: |
| 292 | cmd.append("-x") |
| 293 | cmd += [installer, "-b", *options, "-p", install_dir] |
| 294 | process = _execute(cmd, installer_input=installer_input, timeout=timeout, check=check) |
| 295 | if "WARNING: md5sum mismatch of tar archive" in process.stdout + process.stderr: |
| 296 | raise AssertionError("MD5 mismatch in SH payload!") |
| 297 | return process |
| 298 | |
| 299 | |
| 300 | def _run_installer_pkg( |
no test coverage detected