()
| 67 | |
| 68 | |
| 69 | def _prompt_build() -> Path: |
| 70 | builds = _list_builds() |
| 71 | if not builds: |
| 72 | print("Error: No builds found", file=sys.stderr) |
| 73 | sys.exit(1) |
| 74 | print("Select a build:") |
| 75 | for i, build in enumerate(builds): |
| 76 | print(f" [{i}]: {build}") |
| 77 | while True: |
| 78 | try: |
| 79 | which = int(input("Enter the number of the build to use: ")) |
| 80 | if 0 <= which < len(builds): |
| 81 | valid = _check_build(BUILD / builds[which]) |
| 82 | if valid: |
| 83 | return BUILD / builds[which] |
| 84 | print("Error: Invalid build", file=sys.stderr) |
| 85 | else: |
| 86 | print("Error: Invalid selection", file=sys.stderr) |
| 87 | continue |
| 88 | except ValueError: |
| 89 | print("Error: Invalid input", file=sys.stderr) |
| 90 | continue |
| 91 | |
| 92 | |
| 93 | def _prompt_object_file(build: Path) -> Path: |
no test coverage detected