__init__.py 文件源码

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

项目:kyber 作者: TakumiHQ 项目源码 文件源码
def init_app():
    """ create a new app, or sync with an existing one """
    cwd = os.path.abspath('.')

    try:
        repo = git.Repo.discover(cwd)
    except NotGitRepository:
        click.echo("No repository found")
        sys.exit(1)

    suggested_name = init.get_default_name(cwd)
    if suggested_name is None:
        click.echo("Unable to derive a name from the current git repository or directory!")
        sys.exit(2)

    name = click.prompt("Enter environment name".format(suggested_name), default=suggested_name)

    init.initialize(name, repo.head())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号