MCPcopy Create free account
hub / github.com/apache/kvrocks / get_syspath

Function get_syspath

x.py:245–253  ·  view source on GitHub ↗
(sys_path: str)

Source from the content-addressed store, hash-verified

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',

Callers 1

golangci_lintFunction · 0.85

Calls 3

find_commandFunction · 0.85
run_pipeFunction · 0.85
readMethod · 0.80

Tested by

no test coverage detected