Skip to content

Commit fa9ca2f

Browse files
committed
fix: avoid rlang formatting crash in callr subprocess (#723)
1 parent 13c21ee commit fa9ca2f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

R/task.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,10 @@ TaskManager <- R6::R6Class("TaskManager",
261261
)
262262

263263
package_call <- function(target) {
264-
func <- call(":::", as.name("languageserver"), substitute(target))
265-
target <- eval(substitute(function(...) func(...), list(func = func)))
266-
target
264+
target_name <- as.character(substitute(target))
265+
eval(bquote(
266+
function(...) get(.(target_name), envir = asNamespace("languageserver"))(...)
267+
), envir = baseenv())
267268
}
268269

269270
create_task <- function(target, args, callback = NULL, error = NULL, delay = 0) {

0 commit comments

Comments
 (0)