Cookiecutter.json has a parameter which accepts "yes" or "no":
{ "test" : [ "yes", "no"] }
If a user selects "yes" then it should continue accepting the inputs further, if not it should stop. The same logic is included in pre_gen_project.py under the hooks folder.
try:
if "{{ cookiecutter.test }}" == "yes":
cookiecutter.prompt.read_user_variable("full_name","your_synthetic_test_name")
else:
sys.exit(0)
except Exception as ex:
print("Exception in pre_gen_project script")
Problem here is, it is entering the else condition, but the cookie cutter execution is not stopping here. Any suggestion, Let me know about it. Thank you.