File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
crates/ark/src/modules/positron Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ make_ark_source <- function(original_source) {
3838 # fallback calls.
3939 use_file <- missing(exprs )
4040
41- # Capture environment early if local evaluation is requested
41+ # Capture environment early if local evaluation is requested.
42+ # This is necessary if we have to fallback when `local = TRUE`.
4243 if (isTRUE(local )) {
4344 local <- parent.frame()
4445 }
@@ -102,10 +103,7 @@ make_ark_source <- function(original_source) {
102103 }
103104
104105 env <- if (isTRUE(local )) {
105- # That would be very unexpected since we captured the local
106- # environment in `local` when set to `TRUE`. But just for peace of
107- # mind we handle it here.
108- parent.frame()
106+ stop(" Internal error: `local = TRUE` should have been converted to an environment above." )
109107 } else if (isFALSE(local )) {
110108 .GlobalEnv
111109 } else if (is.environment(local )) {
You can’t perform that action at this time.
0 commit comments