Skip to content

Commit

Permalink
fix: README.qmd is not mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Oct 4, 2024
1 parent a78d9fb commit 469a382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions R/setup_docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ setup_docs <- function(tool, path = ".", overwrite = FALSE) {
}

# README.md is mandatory
if (tool == "quarto_website") {
fn <- "README.qmd"
} else {
fn <- "README.md"
}
fn <- "README.md"
msg <- sprintf("%s is mandatory. `altdoc` created a dummy README file in the package directory.", fn)
fn <- fs::path_join(c(path, fn))
if (!fs::file_exists(fn)) {
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-setup_docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,5 @@ test_that("quarto: README.qmd", {
create_local_package()
expect_false(file.exists("README.qmd"))
setup_docs("quarto_website", overwrite = TRUE)
expect_true(file.exists("README.qmd"))
expect_false(file.exists("README.qmd"))
})

0 comments on commit 469a382

Please sign in to comment.