Skip to content

Commit 793d1d6

Browse files
committed
Also set explicitly to current Deno working dir when in renv projects
1 parent 2dbc444 commit 793d1d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/execute/rmd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ async function callR<T>(
195195
outputFilter?: (output: string) => string,
196196
reportError = true,
197197
): Promise<T> {
198-
// establish cwd for execute (the current dir if there is an renv
198+
// establish cwd for our R scripts (the current dir if there is an renv
199199
// otherwise the project dir if specified)
200-
const cwd = withinActiveRenv() ? undefined : projectDir ?? Deno.cwd();
200+
const cwd = withinActiveRenv() ? Deno.cwd() : projectDir ?? Deno.cwd();
201201

202202
// create a temp file for writing the results
203203
const resultsFile = Deno.makeTempFileSync(

0 commit comments

Comments
 (0)