summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2018-07-25 19:06:33 +1000
committerMichael Hoang <enzime@users.noreply.github.com>2018-07-25 19:06:33 +1000
commit3eeb239ec394d0f17656bbf2ec0ea6c9d33a05dd (patch)
treeb24ded4de9d93b7ce0c2bf170c996430ef357d37
parent53e48ed044b3f69cf21a43a4c9c4450b56972165 (diff)
downloadranger-3eeb239ec394d0f17656bbf2ec0ea6c9d33a05dd.tar.gz
Fix run as root on macOS
su on macOS requires the user to be explicitly specified for a command
to be run.
-rwxr-xr-xranger/ext/rifle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index 672b0597..07a76488 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -357,7 +357,7 @@ class Rifle(object):  # pylint: disable=too-many-instance-attributes
             self.hook_before_executing(command, self._mimetype, self._app_flags)
             try:
                 if 'r' in flags:
-                    prefix = ['sudo', '-E', 'su', '-mc']
+                    prefix = ['sudo', '-E', 'su', 'root', '-mc']
                 else:
                     prefix = ['/bin/sh', '-c']