()
| 26 | |
| 27 | |
| 28 | def _prompt_build() -> Path: |
| 29 | builds = _list_builds() |
| 30 | if not builds: |
| 31 | print("Error: No builds found", file=sys.stderr) |
| 32 | sys.exit(1) |
| 33 | print("Select a build:") |
| 34 | for i, build in enumerate(builds): |
| 35 | print(f" [{i}]: {build}") |
| 36 | while True: |
| 37 | try: |
| 38 | which = int(input("Enter the number of the build to use: ")) |
| 39 | if 0 <= which < len(builds): |
| 40 | valid = _check_build(BUILD / builds[which]) |
| 41 | if valid: |
| 42 | return BUILD / builds[which] |
| 43 | print("Error: Invalid build", file=sys.stderr) |
| 44 | else: |
| 45 | print("Error: Invalid selection", file=sys.stderr) |
| 46 | continue |
| 47 | except ValueError: |
| 48 | print("Error: Invalid input", file=sys.stderr) |
| 49 | continue |
| 50 | |
| 51 | |
| 52 | def _prompt_object_file(build: Path) -> Path: |
no test coverage detected