Enhance RecoveryOS support

This commit is contained in:
Mykola Grymalyuk
2021-05-15 17:54:31 -06:00
parent abe865f999
commit 09779f62b3
2 changed files with 12 additions and 3 deletions

View File

@@ -940,9 +940,11 @@ Please build OpenCore first!"""
print("- Adding Internal Drive icon")
shutil.copy(self.constants.icon_path_internal, mount_path)
print("- Cleaning install location")
subprocess.run(f"dot_clean {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if Constants.Constants().recovery_status == False:
# RecoveryOS doesn't support dot_clean
subprocess.run(["dot_clean", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
print("- Unmounting EFI partition")
subprocess.run(f"diskutil umount {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
subprocess.run(["diskutil", "umount", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
print("- OpenCore transfer complete")
print("\nPress [Enter] to continue.\n")
input()