@@ -41,14 +41,8 @@ def find_executables(self, project_name):
41
41
for file in files :
42
42
# what is the value of variable `root`
43
43
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 )
52
46
return executable_list
53
47
54
48
def delete_project_files (self , project_name ):
@@ -82,14 +76,8 @@ def find_meson_executables(project_name):
82
76
for file in files :
83
77
# what is the value of variable `root`
84
78
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 )
93
81
return executable_list
94
82
95
83
0 commit comments