auto_patcher: Adjust indentation logic

This commit is contained in:
Mykola Grymalyuk
2022-12-25 13:44:14 -07:00
parent 09f77490a5
commit 6fe7ed614c
+8 -4
View File
@@ -179,10 +179,16 @@ class AutomaticSysPatch:
# Installs the following: # Installs the following:
# - OpenCore-Patcher.app in /Library/Application Support/Dortania/ # - OpenCore-Patcher.app in /Library/Application Support/Dortania/
# - com.dortania.opencore-legacy-patcher.auto-patch.plist in /Library/LaunchAgents/ # - com.dortania.opencore-legacy-patcher.auto-patch.plist in /Library/LaunchAgents/
if self.constants.launcher_script is None: if self.constants.launcher_script is not None:
print("- Skipping Auto Patcher Launch Agent, not supported when running from source")
return
if self.constants.launcher_binary.startswith("/Library/Application Support/Dortania/"):
print("- Skipping Auto Patcher Launch Agent, already installed")
return
# Verify our binary isn't located in '/Library/Application Support/Dortania/' # Verify our binary isn't located in '/Library/Application Support/Dortania/'
# As we'd simply be duplicating ourselves # As we'd simply be duplicating ourselves
if not self.constants.launcher_binary.startswith("/Library/Application Support/Dortania/"):
print("- Installing Auto Patcher Launch Agent") print("- Installing Auto Patcher Launch Agent")
if not Path("Library/Application Support/Dortania").exists(): if not Path("Library/Application Support/Dortania").exists():
@@ -229,5 +235,3 @@ class AutomaticSysPatch:
if not Path("/Applications/OpenCore-Patcher.app").exists(): if not Path("/Applications/OpenCore-Patcher.app").exists():
print("- Making app alias") print("- Making app alias")
utilities.process_status(utilities.elevated(["ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) utilities.process_status(utilities.elevated(["ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
else:
print("- Skipping Auto Patcher Launch Agent, not supported when running from source")