Build the final command line for executing the given command,
        using sudo if necessary.

def _build_cmdline(self, args, env={}):
        """
        Build the final command line for executing the given command,
        using sudo if necessary.
        """
        if self._user is None:
            return super(RunExecutor, self)._build_cmdline(args, env)
        result = _SUDO_ARGS + [self._user]
        for var, value in env.items():
            result.append(var + '=' + value)
        return result + ['--'] + args