mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-01-27 10:19:49 +00:00
Stop and display an error if any occur while deleting unnecessary files in the OpenCore EFI
This commit is contained in:
@@ -357,6 +357,7 @@ class builder:
|
||||
if not tool_path in tool_loaded:
|
||||
files_to_remove.append(os.path.join(tools_directory, tool_path))
|
||||
|
||||
error = None
|
||||
for path in files_to_remove:
|
||||
try:
|
||||
if os.path.isdir(path):
|
||||
@@ -364,9 +365,14 @@ class builder:
|
||||
else:
|
||||
os.remove(path)
|
||||
except Exception as e:
|
||||
print(f"Failed to remove file: {e}")
|
||||
error = True
|
||||
print(f"\nFailed to remove file: {e}", end="")
|
||||
continue
|
||||
|
||||
if error:
|
||||
print("")
|
||||
self.utils.request_input()
|
||||
|
||||
def build_efi(self, hardware, macos_version):
|
||||
efi_directory = os.path.join(os.getcwd(), "Results")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user