main.py: Update cwd path

This commit is contained in:
Mykola Grymalyuk
2022-05-04 21:49:27 -06:00
parent 974ce05088
commit 01fa2c349f
+5 -4
View File
@@ -44,10 +44,11 @@ class OpenCoreLegacyPatcher:
if utilities.check_cli_args() is not None:
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") and "--auto_patch" not in sys.argv:
print("- Rerouting payloads location")
self.constants.payload_path = sys._MEIPASS / Path("payloads")
if "--auto_patch" not in sys.argv:
self.constants.current_path = Path.cwd()
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
print("- Rerouting payloads location")
self.constants.payload_path = sys._MEIPASS / Path("payloads")
arguments.arguments().parse_arguments(self.constants)
else:
print(f"- No arguments present, loading {'GUI' if self.constants.wxpython_variant is True else 'TUI'} mode")