File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 10
10
import glob
11
11
import logging
12
12
import os
13
+ from pathlib import Path
13
14
import re
14
15
import shlex
15
16
import shutil
@@ -72,15 +73,13 @@ def project_url(self):
72
73
73
74
def executable (self , tool_locator ):
74
75
exe = tool_locator .find_executable ("Ultimate.py" )
75
- dir_name = os .path .dirname (exe )
76
- logging .debug ("Looking in %s for Ultimate and plugins/" , dir_name )
77
- for _ , dir_names , file_names in os .walk (dir_name ):
78
- if "Ultimate" in file_names and "plugins" in dir_names :
79
- return exe
80
- break
76
+ dir_name = Path (os .path .dirname (exe ))
77
+ logging .debug ("Checking if %s contains a launcher jar" , dir_name )
78
+ if any ([(dir_name / rel_launcher ).exists () for rel_launcher in _LAUNCHER_JARS ]):
79
+ return exe
81
80
msg = (
82
81
f"ERROR: Did find a Ultimate.py in { os .path .dirname (exe )} "
83
- f"but no 'Ultimate' or no 'plugins' directory besides it"
82
+ f"but no launcher .jar besides it"
84
83
)
85
84
raise ToolNotFoundException (msg )
86
85
You can’t perform that action at this time.
0 commit comments