Skip to content

Commit 96a54f5

Browse files
matthew-brettjimhester
authored andcommitted
Fix 'folder' argument to dir_ls
The call to `dir_ls` appears to be incorrect, in that it uses the argument `type = 'folder'`. I do not know whether this was valid at some point in the history of `fs::dir_ls`, but it is invalid now: ``` > fs::dir_ls('.', type = 'folder') Error in match.arg(type, names(directory_entry_types), several.ok = TRUE) : 'arg' should be one of “any”, “unknown”, “file”, “directory”, “symlink”, “FIFO”, “socket”, “character_device”, “block_device” > fs::dir_ls('.', type = 'directory') R inst man man-roxygen pkgdown revdep tests vignettes ``` I hit this bug by a route I now find difficult to reconstruct, but the relevant error is in: https://github.com/resampling-stats/resampling-with/runs/2308006707?check_suite_focus=true#step:7:5600
1 parent 1aaaa99 commit 96a54f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

R/dev-mode.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ is_library <- function(path) {
6767

6868
# otherwise check that the directories are compiled R directories -
6969
# i.e. that they contain a Meta directory
70-
dirs <- dir_ls(path, type = "folder")
70+
dirs <- dir_ls(path, type = "directory")
7171

7272
has_pkg_dir <- function(path) length(dir_ls(path, regexp = "Meta")) > 0
7373
help_dirs <- vapply(dirs, has_pkg_dir, logical(1))

0 commit comments

Comments
 (0)