Ejemplo n.º 1
0
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)
Ejemplo n.º 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)
Ejemplo n.º 3
0
def main(args):
    _init_logging(args)
    config.set_cwd(_cwd(args))
    config.set_guild_home(_guild_home(args))
    _apply_guild_patch()
Ejemplo n.º 4
0
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))