From a33c19448f5e6734cecb690ec59a79e873cacec1 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Tue, 22 Jun 2021 16:55:12 -0600 Subject: [PATCH] Avoid double sudo in CLI --- Resources/SysPatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index 861771fe1..68c252981 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -49,7 +49,7 @@ class PatchSysVolume: self.mount_private_frameworks = f"{self.mount_location}/System/Library/PrivateFrameworks" def elevated(self, *args, **kwargs) -> subprocess.CompletedProcess: - if os.getuid() == 0: + if os.getuid() == 0 or self.constants.gui_mode is True: return subprocess.run(*args, **kwargs) else: return subprocess.run(["sudo"] + [args[0][0]] + args[0][1:], **kwargs)