agusmdev / fastapi-ddd-cookiecutter

This project is a backend template for a FastAPI-based application that uses the repository pattern approach to provide an abstraction layer between the business logic and the data access layer. It aims to provide a scalable and maintainable architecture for building web applications.
MIT License
42 stars 5 forks source link

ERROR: Stopping generation because post_gen_project hook script didn't exit successfully #3

Closed leferrad closed 1 year ago

leferrad commented 1 year ago

Here is the snippet to reproduce the error:

leferrad@niandra:~/Desktop$ cookiecutter https://github.com/agusmdev/fastapi-ddd-template.git
You've downloaded /home/leferrad/.cookiecutters/fastapi-ddd-template before. Is it okay to delete and re-download it? [yes]: yes
project_name [FastAPI DDD project]: Pet Management
project_slug [pet-management]: 
project_description [FastAPI Domain Driven Design (DDD) template]: App to manage pets
author [Agustín Marchi <agusmdev@gmail.com>]: Leandro Ferrado <ljferrado@gmail.com>
first_entity [your_first_entity]: pet
error: unknown option `initial-branch=main'
usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]

    --template <template-directory>
                          directory from which templates will be used
    --bare                create a bare repository
    --shared[=<permissions>]
                          specify that the git repository is to be shared amongst several users
    -q, --quiet           be quiet
    --separate-git-dir <gitdir>
                          separate git dir from working tree

ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 129)

Maybe the tool is assuming some minimum git version (check this) so you can either make it work for different git versions or specify the dependency with the min version required.

agusmdev commented 1 year ago

Thank you! Now the script only uses git init so the branch issue should disappear