Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions leanblueprint/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,15 @@ def new() -> None:
if home_page_created:
files_to_add.append(jekyll_out_dir)

# Check if the 'lean-toolchain' file exists
lean_toolchain_path = Path(repo.working_dir) / "lean-toolchain"
if lean_toolchain_path.exists():
# Check for differences between the 'lean-toolchain' file and the last committed version
diff = repo.git.diff("HEAD", "--", str(lean_toolchain_path))
# If there are changes (the diff is not empty), add the file to the list of files to be committed
if diff:
files_to_add.append(lean_toolchain_path)

if not confirm("\nCommit to git repository?"):
console.print("You are all set! Don’t forget to commit whenever you feel ready.")
sys.exit(0)
Expand Down