devtools
devtools copied to clipboard
`dev_mode()` fails with ENOENT when directory does not exist
On Windows 11 with R 4.2.1, devtools::dev_mode()
fails when the development directory does not exist. Creating the directory first yields success.
devtools::dev_mode()
Error: [ENOENT] Failed to realize 'C:/Users/wdenn/R-dev': no such file or directory
> traceback()
3: (function (..., call. = TRUE, domain = NULL)
{
if (...length() == 1L && inherits(..1, "condition")) {
cond <- ..1
if (nargs() > 1L)
warning("additional arguments ignored in stop()")
message <- conditionMessage(cond)
call <- conditionCall(cond)
.Internal(.signalCondition(cond, message, call))
.Internal(.dfltStop(message, call))
}
else .Internal(stop(call., .makeMessage(..., domain = domain)))
})(structure(list(message = "[ENOENT] Failed to realize 'C:/Users/wdenn/R-dev': no such file or directory"), class = c("ENOENT",
"fs_error", "error", "condition"), location = "path.cc:21"))
2: path_real(path)
1: devtools::dev_mode()
> dir.create("C:/Users/wdenn/R-dev")
> devtools::dev_mode()
✔ Dev mode: ON