rorybyrne / git-plan

Git Plan - a better workflow for git
MIT License
181 stars 5 forks source link

feat: offer to initialize the project for the user, if they try to perform an action that requires an initialized project #64

Open rorybyrne opened 3 years ago

rorybyrne commented 3 years ago

For example, if I move into a new directory and run git plan add, I should see an error message AND be prompted to initialize by typing "y"

rorybyrne commented 3 years ago

This could be handled in __cli__.py by catching the ProjectNotInitialized exception and then triggering the init command with a prompt=True flag. The init command can be modified to optionally prompt the user before continuing with initialization.