From 3eeb239ec394d0f17656bbf2ec0ea6c9d33a05dd Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Wed, 25 Jul 2018 19:06:33 +1000 Subject: Fix run as root on macOS su on macOS requires the user to be explicitly specified for a command to be run. --- ranger/ext/rifle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'] -- cgit 1.4.1-2-gfad0