Skip to content
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

dev_mode() fails with ENOENT when directory does not exist #2467

Closed
billdenney opened this issue Aug 29, 2022 · 2 comments
Closed

dev_mode() fails with ENOENT when directory does not exist #2467

billdenney opened this issue Aug 29, 2022 · 2 comments

Comments

@billdenney
Copy link
Contributor

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
@hadley
Copy link
Member

hadley commented Oct 8, 2022

dev_mode() is not a function that we recommend or use any more, so we won't fix this.

@hadley hadley closed this as completed Oct 8, 2022
@billdenney
Copy link
Contributor Author

Thanks for letting me know. I didn't see that in the documentation, so I will make a documentation PR to clarify the deprecation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants