-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine section_init() and create_subdir() #2646
Conversation
* We can figure out `depth` based on whether or not a `subdir` is supplied * Ensures all user facing functions have the same interface * Brings together directory checking code in one place Fixes #2644
subdir = NULL, | ||
override = list(), | ||
.frame = parent.frame()) { | ||
rstudio_save_all() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to save all files before we read in the yaml.
I think it is a good idea. But this somehow seems to break the workflow I created in #2571. i.e. to call @hadley think I found the reason. I think that if 'check_dest_is_pkgdown() |
Is the no-pandoc failure stochastic ? If so, maybe we should skip this test if no pandoc? |
I figured out a reprex: src_path <- withr::local_tempdir()
writeLines(path(src_path, "README.md"), "Hi")
description <- desc::desc("!new")
description$set("Package", "testpackage")
description$set("Title", "A test package")
description$write(file = path(src_path, "DESCRIPTION"))
build_home(src_path)
clean_site(src_path)
build_home(src_path) |
Ah yeah, the problem is we should check for files, not whether or not the directory exists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops
IMO this isn't worth its own a news bullet because it's more of a refinement of existing work that already has news bullets. |
depth
based on whether or not asubdir
is suppliedoverride
)Fixes #2644
@olivroy I started reviewing #2645 but then I wondered if maybe we could simplify things by unifying
section_init()
andcreate_subdir()
and that resulted in this PR 😄