Add better CLI error handling

This commit is contained in:
Mykola Grymalyuk
2022-05-18 20:11:14 -06:00
parent c8a70764b8
commit 23119dedc9
4 changed files with 4 additions and 2 deletions
+1
View File
@@ -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")