runner.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:boss 作者: kabirbaidhya 项目源码 文件源码
def run_script(script, remote=True):
    ''' Run a script. '''
    custom_scripts = _get_config()['scripts']

    # If the script is not defined raise error.
    if not is_script_defined(script):
        raise RuntimeError('Missing script "{}"'.format(script))

    # Get the command defined in the script.
    script_cmd = custom_scripts[script]

    info_text = 'Running {}\n{}'.format(
        cyan(script), cyan('> ' + script_cmd)
    )
    host_info(info_text, remote=remote)

    # Run a custom script defined in the config.
    with hide('running'):
        run(script_cmd, remote)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号