Skip to content

Commit

Permalink
Just warn if doctest() fails to clean up (#1526)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6ad949c)
  • Loading branch information
mortenpi committed Feb 14, 2021
1 parent ee2030b commit 027c92a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Version `v0.26.2`

* ![Enhancement][badge-enhancement] `doctest()` no longer throws an error if cleaning up the temporary directory fails for some reason. ([#1513][github-1513], [#1526][github-1526])

* ![Bugfix][badge-bugfix] Script-type doctests that have an empty output section no longer crash Documenter. ([#1510][github-1510])

* ![Bugfix][badge-bugfix] When checking for authentication keys when deploying, Documenter now more appropriately checks if the environment variables are non-empty, rather than just whether they are defined. ([#1511][github-1511])
Expand Down Expand Up @@ -734,10 +736,12 @@
[github-1497]: https://github.com/JuliaDocs/Documenter.jl/pull/1497
[github-1510]: https://github.com/JuliaDocs/Documenter.jl/pull/1510
[github-1511]: https://github.com/JuliaDocs/Documenter.jl/pull/1511
[github-1513]: https://github.com/JuliaDocs/Documenter.jl/issues/1513
[github-1516]: https://github.com/JuliaDocs/Documenter.jl/issues/1516
[github-1518]: https://github.com/JuliaDocs/Documenter.jl/pull/1518
[github-1519]: https://github.com/JuliaDocs/Documenter.jl/pull/1519
[github-1520]: https://github.com/JuliaDocs/Documenter.jl/pull/1520
[github-1526]: https://github.com/JuliaDocs/Documenter.jl/pull/1526

[julia-38079]: https://github.com/JuliaLang/julia/issues/38079

Expand Down
6 changes: 5 additions & 1 deletion src/Documenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,11 @@ function doctest(
@error "Doctesting failed" exception=(err, catch_backtrace())
false
finally
rm(dir; recursive=true)
try
rm(dir; recursive=true)
catch e
@warn "Documenter was unable to clean up the temporary directory $(dir)" exception = e
end
end
end
@testset "$testset" begin
Expand Down

0 comments on commit 027c92a

Please sign in to comment.