Open Bisaloo opened 3 months ago
When docs/ is not empty and not created by pkgdown, an error message will be returned:
docs/
https://github.com/r-lib/pkgdown/blob/c7c4865d9ebd492010c99db13a3e377cd1d9ed34/R/clean.R#L30-L41
But when running pkgdown::clean_site(), the same message is returned because clean_site() itself calls check_dest_is_pkgdown():
pkgdown::clean_site()
clean_site()
check_dest_is_pkgdown()
https://github.com/r-lib/pkgdown/blob/c7c4865d9ebd492010c99db13a3e377cd1d9ed34/R/clean.R#L19-L21
I can create a reprex package for this issue if helpful.
Hmmm, I think it's the advice that's wrong here — clean_site() is specifically for cleaning up sites (as the name suggests 😄) not deleting directories that aren't sites.
When
docs/
is not empty and not created by pkgdown, an error message will be returned:https://github.com/r-lib/pkgdown/blob/c7c4865d9ebd492010c99db13a3e377cd1d9ed34/R/clean.R#L30-L41
But when running
pkgdown::clean_site()
, the same message is returned becauseclean_site()
itself callscheck_dest_is_pkgdown()
:https://github.com/r-lib/pkgdown/blob/c7c4865d9ebd492010c99db13a3e377cd1d9ed34/R/clean.R#L19-L21
I can create a reprex package for this issue if helpful.