diff --git a/src/rosdep2/installers.py b/src/rosdep2/installers.py index 91474e7d8..516230c24 100644 --- a/src/rosdep2/installers.py +++ b/src/rosdep2/installers.py @@ -29,6 +29,7 @@ from __future__ import print_function +import os import subprocess import traceback @@ -320,7 +321,7 @@ def __init__(self, detect_fn, supports_depends=False): self.detect_fn = detect_fn self.supports_depends = supports_depends self.as_root = True - self.sudo_command = 'sudo -H' + self.sudo_command = 'sudo -H' if os.geteuid() != 0 else "" def elevate_priv(self, cmd): """