def run(options):
    if (not options.verbose):
        mlog.set_quiet()
    try:
        rewriter = Rewriter(options.sourcedir, skip_errors=options.skip)
        rewriter.analyze_meson()
        if (options.type is None):
            mlog.error('No command specified')
            return 1
        commands = cli_type_map[options.type](options)
        if (not isinstance(commands, list)):
            raise TypeError('Command is not a list')
        for i in commands:
            if (not isinstance(i, object)):
                raise TypeError('Command is not an object')
            rewriter.process(i)
        rewriter.apply_changes()
        rewriter.print_info()
        return 0
    except Exception as e:
        raise e
    finally:
        mlog.set_verbose()
def run(options):
    if (not options.verbose):
        mlog.set_quiet()
    try:
        rewriter = Rewriter(options.sourcedir, skip_errors=options.skip)
        rewriter.analyze_meson()
        if (options.type is None):
            mlog.error('No command specified')
            return 1
        commands = cli_type_map[options.type](options)
        if (not isinstance(commands, list)):
            raise TypeError('Command is not a list')
        for i in commands:
            if (not isinstance(i, object)):
                raise TypeError('Command is not an object')
            rewriter.process(i)
        rewriter.apply_changes()
        rewriter.print_info()
        return 0
    except Exception as e:
        raise e
    finally:
        mlog.set_verbose()