(self, tool, command, *, ignore_errors=False)
| 108 | self._write_success_message(tool) |
| 109 | |
| 110 | def _run_command(self, tool, command, *, ignore_errors=False): |
| 111 | try: |
| 112 | with original_ld_library_path(): |
| 113 | self.subprocess_utils.run( |
| 114 | command, |
| 115 | capture_output=True, |
| 116 | check=True, |
| 117 | ) |
| 118 | except subprocess.CalledProcessError as ex: |
| 119 | if not ignore_errors: |
| 120 | raise CommandFailedError(ex, self.auth_token) |
| 121 | except OSError as ex: |
| 122 | if ex.errno == errno.ENOENT: |
| 123 | raise ValueError(self._TOOL_NOT_FOUND_MESSAGE % tool) |
| 124 | raise ex |
| 125 | |
| 126 | @classmethod |
| 127 | def get_commands(cls, endpoint, auth_token, **kwargs): |
no test coverage detected