mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Handle EFI errors better
This commit is contained in:
@@ -275,9 +275,10 @@ def ListDiskutil():
|
|||||||
|
|
||||||
def MoveOpenCore():
|
def MoveOpenCore():
|
||||||
print("")
|
print("")
|
||||||
print("Coping OpenCore onto Volumes/EFI")
|
|
||||||
efiVol = "/Volumes/EFI"
|
efiVol = "/Volumes/EFI"
|
||||||
if os.path.exists(efiVol):
|
if os.path.exists(efiVol):
|
||||||
|
print("Coping OpenCore onto Volumes/EFI")
|
||||||
if os.path.exists("/Volumes/EFI/EFI"):
|
if os.path.exists("/Volumes/EFI/EFI"):
|
||||||
print("Cleaning EFI folder")
|
print("Cleaning EFI folder")
|
||||||
rmtree("/Volumes/EFI/EFI")
|
rmtree("/Volumes/EFI/EFI")
|
||||||
@@ -286,6 +287,9 @@ def MoveOpenCore():
|
|||||||
copy(Versions.icon_path, efiVol)
|
copy(Versions.icon_path, efiVol)
|
||||||
print("OpenCore transfer complete")
|
print("OpenCore transfer complete")
|
||||||
print("")
|
print("")
|
||||||
|
else:
|
||||||
|
print("Couldn't find EFI partition")
|
||||||
|
print("")
|
||||||
|
|
||||||
def MountOpenCore():
|
def MountOpenCore():
|
||||||
subprocess.Popen((r"sudo diskutil mount $(nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | sed 's/.*GPT,\([^,]*\),.*/\1/')").split())
|
subprocess.Popen((r"sudo diskutil mount $(nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | sed 's/.*GPT,\([^,]*\),.*/\1/')").split())
|
||||||
Reference in New Issue
Block a user