Work around payload write error with Auto Patcher

This commit is contained in:
Mykola Grymalyuk
2022-05-04 21:24:50 -06:00
parent 7169687441
commit 974ce05088
2 changed files with 2 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ class OpenCoreLegacyPatcher:
print("- Detected arguments, switching to CLI mode")
self.constants.gui_mode = True # Assumes no user interaction is required
self.constants.current_path = Path.cwd()
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS") and "--auto_patch" not in sys.argv:
print("- Rerouting payloads location")
self.constants.payload_path = sys._MEIPASS / Path("payloads")
arguments.arguments().parse_arguments(self.constants)

View File

@@ -165,7 +165,7 @@ class PatchSysVolume:
utilities.process_status(utilities.elevated(["mkdir", f"{self.mount_application_support}/SkyLightPlugins"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
else:
print("- Creating SkylightPlugins folder")
utilities.process_status(utilities.elevated(["mkdir", f"{self.mount_application_support}/SkyLightPlugins/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
utilities.process_status(utilities.elevated(["mkdir", "-p", f"{self.mount_application_support}/SkyLightPlugins/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
def patch_root_vol(self):