Commits

Colin Copeland committed 47c6e57

add -i to sudo command so environment vars are loaded properly

Comments (0)

Files changed (1)

     def sudo(self, cmd):
         sudo_cmd = ['sudo']
         if self.sudo_user:
-            sudo_cmd.append('-u %s' % self.sudo_user)
+            sudo_cmd.append('-iu %s' % self.sudo_user)
         sudo_cmd.append(cmd)
         self.logger.debug(sudo_cmd)
         return ' '.join(sudo_cmd)