PragmaTwice commented on code in PR #1491:
URL: 
https://github.com/apache/incubator-kvrocks/pull/1491#discussion_r1227487423


##########
x.py:
##########
@@ -192,15 +193,24 @@ def clang_tidy(dir: str, jobs: Optional[int], 
clang_tidy_path: str, run_clang_ti
     run(run_command, *options, *regexes, verbose=True, cwd=basedir)
 
 
-def golangci_lint() -> None:
-    go = find_command('go', msg='go is required for testing')
-    gopath = run_pipe(go, 'env', 'GOPATH').read().strip()
-    bindir = Path(gopath).absolute() / 'bin'
-    binpath = bindir / 'golangci-lint'
-    if not binpath.exists():
-        output = run_pipe('curl', '-sfL', 
'https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh',
-                          verbose=True)
-        run('sh', '-s', '--', '-b', str(bindir), 'v1.49.0', verbose=True, 
stdin=output)
+def golangci_lint(golangci_lint_path: str) -> None:
+    binpath = ""
+    if system('which '+ golangci_lint_path)  == 0:

Review Comment:
   `shutil.which` seems to be a better choice here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to