Open jfbu opened 10 hours ago
I can confirm this from following the repro steps.
A possible fix:
diff --git a/sphinx/cmd/make_mode.py b/sphinx/cmd/make_mode.py
index 5966b628a..7642b6229 100644
--- a/sphinx/cmd/make_mode.py
+++ b/sphinx/cmd/make_mode.py
@@ -87,7 +87,7 @@ class Make:
return 1
print("Removing everything under '%s'..." % self.build_dir)
for item in self.build_dir.iterdir():
- rmtree(self.build_dir_join(item))
+ rmtree(item)
return 0
def build_help(self) -> None:
(the code in HEAD performs a build-dir-relative resolution step for each item-to-clean from the build dir, and that seems to be the bug, I think?)
We might also want to use build_dir
instead of self.build_dir
in that part of the code, I think. I'll open a pull request soon unless anyone else gets to that before me.
Describe the bug
We can not execute
make clean
anymore on current Sphinx HEADHow to Reproduce
sphinx-quickstart then
make html && make clean
. Install first Sphinx master in a venv.Environment Information
Sphinx extensions
Additional context
First bad commit is reported by
git bisect
to be de24fd0b76f6d86672a721f8c130642b0be4bcf0I am on macOS, too old to reveal which one here publicly (I don't want to be attacked by hackers).