ソースを参照

fix: remove the .gitignore when the user doesn't use git

trgiangdo 11 ヶ月 前
コミット
2a2f816351

+ 2 - 0
taipy/templates/default/hooks/post_gen_project.py

@@ -192,6 +192,8 @@ shutil.rmtree(os.path.join(os.getcwd(), "sections"))
 git_init_message = ""
 if "{{ cookiecutter.__git }}".upper() in ["YES", "Y"]:
     git_init_message = initialize_as_git_project(os.getcwd())
+else:
+    os.remove(os.path.join(os.getcwd(), ".gitignore"))
 
 main_file_name = "{{cookiecutter.__main_file}}.py"
 print(

+ 2 - 0
taipy/templates/scenario-management/hooks/post_gen_project.py

@@ -50,6 +50,8 @@ else:
 git_init_message = ""
 if "{{ cookiecutter.__git }}".upper() in ["YES", "Y"]:
     git_init_message = initialize_as_git_project(os.getcwd())
+else:
+    os.remove(os.path.join(os.getcwd(), ".gitignore"))
 
 main_file_name = "{{cookiecutter.__main_file}}.py"
 print(