mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2025-01-22 18:13:50 -05:00
Fix UAC elevation issues with space in path
This commit is contained in:
parent
c73042f475
commit
9a683e716f
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ class Utils:
|
||||||
if self.check_admin():
|
if self.check_admin():
|
||||||
return
|
return
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, file, None, 1)
|
ctypes.windll.shell32.ShellExecuteW(None, "runas", '"{}"'.format(sys.executable), '"{}"'.format(file), None, 1)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
p = subprocess.Popen(["which", "sudo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
p = subprocess.Popen(["which", "sudo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
Loading…
Reference in a new issue