예제 #1
0
파일: run_impl.py 프로젝트: yuanbw/guildai
def _change_cwd_for_guildfile_run(run):
    """Changes Guild cwd if run is associated with a Guild file.

    Used when a restart/start needs access to cwd Guild file.
    """
    gf = run_util.run_guildfile(run)
    if gf:
        config.set_cwd(gf.dir)
예제 #2
0
def _change_cwd_for_run(run):
    """Changes Guild cwd if run is associated with a local directory.

    Used when a restart/start needs access to a project Guild and to
    resolve relative paths for opspecs.
    """
    project_dir = run_util.run_project_dir(run)
    if project_dir:
        config.set_cwd(project_dir)
예제 #3
0
def main(args):
    _init_logging(args)
    config.set_cwd(_cwd(args))
    config.set_guild_home(_guild_home(args))
    _apply_guild_patch()
예제 #4
0
파일: main_impl.py 프로젝트: jli206/guildai
def main(args):
    log.init_logging(args.log_level or logging.INFO)
    config.set_cwd(_validated_dir(args.cwd))
    config.set_guild_home(
        _validated_dir(args.guild_home, abs=True, create=True))