Skip to content

Commit 2b75238

Browse files
committed
The deprecation will actually happen in 2.4.6
1 parent 9c19839 commit 2b75238

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

R/dev-mode.R

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#' @description
44
#' `r lifecycle::badge("deprecated")`
55
#'
6-
76
#' We no longer recommend `dev_mode()` and it will be removed in a future
87
#' release of devtools. Instead, we now rely on [load_all()] to test drive an
98
#' in-development package. If you really like the idea of corralling
@@ -32,7 +31,7 @@ dev_mode <- local({
3231
.prompt <- NULL
3332

3433
function(on = NULL, path = getOption("devtools.path")) {
35-
lifecycle::deprecate_warn("2.4.5", "dev_mode()")
34+
lifecycle::deprecate_warn("2.4.6", "dev_mode()")
3635
lib_paths <- .libPaths()
3736

3837
path <- path_real(path)
@@ -58,15 +57,19 @@ dev_mode <- local({
5857
cli::cli_inform(c(v = "Dev mode: ON"))
5958
options(dev_path = path)
6059

61-
if (is.null(.prompt)) .prompt <<- getOption("prompt")
60+
if (is.null(.prompt)) {
61+
.prompt <<- getOption("prompt")
62+
}
6263
options(prompt = paste("d> "))
6364

6465
.libPaths(c(path, lib_paths))
6566
} else {
6667
cli::cli_inform(c(v = "Dev mode: OFF"))
6768
options(dev_path = NULL)
6869

69-
if (!is.null(.prompt)) options(prompt = .prompt)
70+
if (!is.null(.prompt)) {
71+
options(prompt = .prompt)
72+
}
7073
.prompt <<- NULL
7174

7275
.libPaths(setdiff(lib_paths, path))
@@ -76,7 +79,9 @@ dev_mode <- local({
7679

7780
is_library <- function(path) {
7881
# empty directories can be libraries
79-
if (length(dir_ls(path)) == 0) return(TRUE)
82+
if (length(dir_ls(path)) == 0) {
83+
return(TRUE)
84+
}
8085

8186
# otherwise check that the directories are compiled R directories -
8287
# i.e. that they contain a Meta directory

0 commit comments

Comments
 (0)