mdklatt / cookiecutter-python-app

Cookiecutter template for a Python application project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deploy.py fails with --repo option for a local relative directory

mdklatt opened this issue · comments

Trying to deploy from the project directory fails, i.e. deploy.py --repo=..

deploy.py:83:

with tmpdir():
    clone = "git clone {:s} {:s}".format(args.repo, _NAME)
    check_call(split(clone))

Relative paths need to be resolved before changing the working directory to the tmp directory.

This works if args.repo is a local file path, but if it's a Git URL it will be treated like a local path.

repo = abspath(args.repo)
with tmpdir():
    clone = "git clone {:s} {:s}".format(repo, _NAME)
    check_call(split(clone))

Issue resolved by commit 6950bc2.