def run_command(self, cmd, args, env, source_dir, build_dir, subdir, mesonintrospect, in_builddir, check=False):
    command_array = (cmd.get_command() + args)
    menv = {'MESON_SOURCE_ROOT': source_dir, 'MESON_BUILD_ROOT': build_dir, 'MESON_SUBDIR': subdir, 'MESONINTROSPECT': ' '.join([shlex.quote(x) for x in mesonintrospect])}
    if in_builddir:
        cwd = os.path.join(build_dir, subdir)
    else:
        cwd = os.path.join(source_dir, subdir)
    child_env = os.environ.copy()
    child_env.update(menv)
    child_env = env.get_env(child_env)
    stdout = (subprocess.PIPE if self.capture else subprocess.DEVNULL)
    mlog.debug('Running command:', ' '.join(command_array))
    try:
        (p, o, e) = Popen_safe(command_array, stdout=stdout, env=child_env, cwd=cwd)
        if self.capture:
            mlog.debug('--- stdout ---')
            mlog.debug(o)
        else:
            o = ''
            mlog.debug('--- stdout disabled ---')
        mlog.debug('--- stderr ---')
        mlog.debug(e)
        mlog.debug('')
        if (check and (p.returncode != 0)):
            raise InterpreterException('Command "{}" failed with status {}.'.format(' '.join(command_array), p.returncode))
        return (p, o, e)
    except FileNotFoundError:
        raise InterpreterException(('Could not execute command "%s".' % ' '.join(command_array)))
def run_command(self, cmd, args, env, source_dir, build_dir, subdir, mesonintrospect, in_builddir, check=False):
    command_array = (cmd.get_command() + args)
    menv = {'MESON_SOURCE_ROOT': source_dir, 'MESON_BUILD_ROOT': build_dir, 'MESON_SUBDIR': subdir, 'MESONINTROSPECT': ' '.join([shlex.quote(x) for x in mesonintrospect])}
    if in_builddir:
        cwd = os.path.join(build_dir, subdir)
    else:
        cwd = os.path.join(source_dir, subdir)
    child_env = os.environ.copy()
    child_env.update(menv)
    child_env = env.get_env(child_env)
    stdout = (subprocess.PIPE if self.capture else subprocess.DEVNULL)
    mlog.debug('Running command:', ' '.join(command_array))
    try:
        (p, o, e) = Popen_safe(command_array, stdout=stdout, env=child_env, cwd=cwd)
        if self.capture:
            mlog.debug('--- stdout ---')
            mlog.debug(o)
        else:
            o = 
            mlog.debug('--- stdout disabled ---')
        mlog.debug('--- stderr ---')
        mlog.debug(e)
        mlog.debug()
        if (check and (p.returncode != 0)):
            raise InterpreterException('Command "{}" failed with status {}.'.format(' '.join(command_array), p.returncode))
        return (p, o, e)
    except FileNotFoundError:
        raise InterpreterException(('Could not execute command "%s".' % ' '.join(command_array)))