(sys_path: str)
| 243 | return bindir, binpath |
| 244 | |
| 245 | def get_syspath(sys_path: str) -> Tuple[str, str]: |
| 246 | golangci_command = find_command(sys_path, msg="golangci-lint is required") |
| 247 | version_res = run_pipe(golangci_command, '--version').read().strip() |
| 248 | version_re_res = re.search(r'version\s+((?:\w|\.)+)', version_res) |
| 249 | if version_re_res: |
| 250 | version_str = version_re_res.group(1) |
| 251 | else: |
| 252 | raise RuntimeError(f"version not found in `{golangci_command} --version`") |
| 253 | return golangci_command, version_str |
| 254 | |
| 255 | def download_package(bindir: str) -> None: |
| 256 | output = run_pipe('curl', '-sfL', 'https://golangci-lint.run/install.sh', |
no test coverage detected