Skip to content

Commit dba99d4

Browse files
authored
Fix test-lean failure when LEAN project directory exists but is incomplete (#629)
1 parent bff201b commit dba99d4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## [Unreleased]
22

3+
### Bugfixes
4+
5+
* Fix `test-lean` failure when LEAN project directory exists but is incomplete
6+
7+
## v25.12.1
8+
39
### Enhancements
410

511
* Integrate `libcurl` for HTTP requests, replacing external `curl`/`wget` tools

src/form/lean.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ bool LeanFormula::initializeLeanProject() {
367367
return true;
368368
}
369369

370+
// If directory exists but lakefile doesn't, clean up incomplete initialization
371+
if (isDir(projectDir)) {
372+
Log::get().info("Removing incomplete LEAN project at " + projectDir);
373+
rmDirRecursive(projectDir);
374+
}
375+
370376
Log::get().info("Initializing LEAN project at " + projectDir);
371377

372378
// Use lake to create a new Lean project with Mathlib dependency

0 commit comments

Comments
 (0)