Skip to content

Include git in requirements #439

@aidanconnolly

Description

@aidanconnolly

For those installing tarbell on linux, it is possible they don't have git installed. Then, when they go to install a blueprint, the command breaks in this block.

        try:
            puts("\nInstalling {0}".format(colored.cyan(template_url)))
            puts("\n- Cloning repo")
            git = sh.git.bake(_cwd=tempdir, _tty_in=True, _tty_out=False, _err_to_out=True)
            puts(git.clone(template_url, '.'))

            _install_requirements(tempdir)

            filename, pathname, description = imp.find_module('blueprint', [tempdir])
            blueprint = imp.load_module('blueprint', filename, pathname, description)
            puts("\n- Found _blueprint/blueprint.py")
            name = blueprint.NAME
            puts("\n- Name specified in blueprint.py: {0}".format(colored.yellow(name)))
            settings.config["project_templates"].append({"name": name, "url": template_url})
            settings.save()

        except AttributeError:
            name = template_url.split("/")[-1]
            error = "\n- No name specified in blueprint.py, using '{0}'".format(colored.yellow(name))

It returns the misleading error, "No name specified in blueprint.py." The actual error is that git is undefined.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions