mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-08-25 14:53:06 +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:
|
if not tool_path in tool_loaded:
|
||||||
files_to_remove.append(os.path.join(tools_directory, tool_path))
|
files_to_remove.append(os.path.join(tools_directory, tool_path))
|
||||||
|
|
||||||
|
error = None
|
||||||
for path in files_to_remove:
|
for path in files_to_remove:
|
||||||
try:
|
try:
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
@@ -364,9 +365,14 @@ class builder:
|
|||||||
else:
|
else:
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Failed to remove file: {e}")
|
error = True
|
||||||
|
print(f"\nFailed to remove file: {e}", end="")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if error:
|
||||||
|
print("")
|
||||||
|
self.utils.request_input()
|
||||||
|
|
||||||
def build_efi(self, hardware, macos_version):
|
def build_efi(self, hardware, macos_version):
|
||||||
efi_directory = os.path.join(os.getcwd(), "Results")
|
efi_directory = os.path.join(os.getcwd(), "Results")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user