Skip to content

Commit a606294

Browse files
committed
Switch to uv. Deleted unwanted directories
Signed-off-by: Prabhu Subramanian <[email protected]>
1 parent de2a337 commit a606294

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

blint_db/handlers/language_handlers/meson_handler.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,8 @@ def find_executables(self, project_name):
4141
for file in files:
4242
# what is the value of variable `root`
4343
file_path = Path(root) / file
44-
if os.access(file_path, os.X_OK):
45-
full_path = file_path
46-
print ("Executing file", full_path)
47-
file_output = subprocess.run(
48-
["/usr/bin/file", full_path], capture_output=True, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8"
49-
)
50-
if "ELF" in file_output.stdout:
51-
executable_list.append(full_path)
44+
if os.access(file_path, os.X_OK) or ".so" in file_path.absolute():
45+
executable_list.append(file_path)
5246
return executable_list
5347

5448
def delete_project_files(self, project_name):
@@ -82,14 +76,8 @@ def find_meson_executables(project_name):
8276
for file in files:
8377
# what is the value of variable `root`
8478
file_path = Path(root) / file
85-
if os.access(file_path, os.X_OK):
86-
full_path = file_path
87-
print ("Executing file", full_path)
88-
file_output = subprocess.run(
89-
["/usr/bin/file", full_path], capture_output=True, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8"
90-
)
91-
if "ELF" in file_output.stdout:
92-
executable_list.append(full_path)
79+
if os.access(file_path, os.X_OK) or ".so" in file_path.absolute():
80+
executable_list.append(file_path)
9381
return executable_list
9482

9583

0 commit comments

Comments
 (0)