We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 964e5ff commit 6c29a11Copy full SHA for 6c29a11
dev/run-tests.py
@@ -254,10 +254,8 @@ def kill_zinc_on_port(zinc_port):
254
Kill the Zinc process running on the given port, if one exists.
255
"""
256
cmd = "%s -P |grep %s | grep LISTEN | awk '{ print $2; }' | xargs kill"
257
- try:
258
- subprocess.check_call(cmd % ("lsof", zinc_port), shell=True)
259
- except:
260
- subprocess.check_call(cmd % ("/usr/sbin/lsof", zinc_port), shell=True)
+ lsof_exe = which("lsof")
+ subprocess.check_call(cmd % (lsof_exe if lsof_exe else "/usr/sbin/lsof", zinc_port), shell=True)
261
262
263
def exec_maven(mvn_args=()):
0 commit comments