Skip to content

Commit a890bdf

Browse files
committed
🎨 update check_tool_usable
Signed-off-by: cyw3 <2927096163@qq.com>
1 parent a2ddbeb commit a890bdf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

client/tool/amani.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def analyze(self, params):
3737
return issues
3838

3939
def check_tool_usable(self, tool_params):
40-
cmds = Tool().get_cmd(["--version"])
4140
if settings.PLATFORMS[sys.platform] == "mac":
4241
return []
43-
elif SubProcController(cmds).wait() != 0:
42+
cmds = Tool().get_cmd(["--version"])
43+
if SubProcController(cmds).wait() != 0:
4444
return []
4545
return ["analyze"]
4646

client/tool/collie.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def analyze(self, params):
3232
return issues
3333

3434
def check_tool_usable(self, tool_params):
35-
cmds = Tool().get_cmd(["-v"])
3635
if settings.PLATFORMS[sys.platform] == "mac":
3736
return []
38-
elif SubProcController(cmds).wait() != 0:
37+
cmds = Tool().get_cmd(["-v"])
38+
if SubProcController(cmds).wait() != 0:
3939
return []
4040
return ["analyze"]
4141

0 commit comments

Comments
 (0)