mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
Add better CLI error handling
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
- Applicable for BCM2046 and BCM2070 chipsets
|
||||
- Fix backported to 0.4.5 release
|
||||
- GUI Enhancements:
|
||||
- Greatly speed up GUI load times (300-800% on average)
|
||||
- Greatly improve GUI load times (300-800% on average)
|
||||
|
||||
## 0.4.5
|
||||
- Fix AutoPatcher.pkg download on releases
|
||||
|
||||
@@ -107,6 +107,7 @@ class Constants:
|
||||
self.ignore_updates = False # Ignore OCLP updates
|
||||
self.wxpython_variant = False # Determine if using wxPython variant
|
||||
self.unpack_thread = None # Determine if unpack thread finished
|
||||
self.cli_mode = False # Determine if running in CLI mode
|
||||
|
||||
## Hardware
|
||||
self.computer: device_probe.Computer = None # type: ignore
|
||||
|
||||
@@ -53,6 +53,7 @@ class OpenCoreLegacyPatcher:
|
||||
ignore_args = ["--auto_patch", "--gui_patch", "--gui_unpatch"]
|
||||
if not any(x in sys.argv for x in ignore_args):
|
||||
self.constants.current_path = Path.cwd()
|
||||
self.constants.cli_mode = True
|
||||
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||
print("- Rerouting payloads location")
|
||||
self.constants.payload_path = sys._MEIPASS / Path("payloads")
|
||||
|
||||
@@ -309,7 +309,7 @@ class PatchSysVolume:
|
||||
return output
|
||||
|
||||
def download_files(self):
|
||||
if self.constants.gui_mode is False or "Library/InstallerSandboxes/" in str(self.constants.payload_path):
|
||||
if self.constants.cli_mode is True:
|
||||
download_result, link = sys_patch_download.grab_patcher_support_pkg(self.constants).download_files()
|
||||
else:
|
||||
download_result = True
|
||||
|
||||
Reference in New Issue
Block a user