Skip to content

Commit 48c2f21

Browse files
committed
only support "file" and "project" options for execute-dir
1 parent 09f4ec6 commit 48c2f21

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/QuartoNotebookWorker/src/refresh.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function refresh!(path, original_options, options = original_options)
44
# We check the `execute-dir` key in the options,
55
if haskey(options, "project") && haskey(options["project"], "execute-dir")
66
ed = options["project"]["execute-dir"]
7-
if ed == "directory"
7+
if ed == "file"
88
cd(dirname(path))
99
elseif ed == "project"
1010
# TODO: this doesn't seem right. How does one get the root path of the project here?
@@ -14,13 +14,11 @@ function refresh!(path, original_options, options = original_options)
1414
cd(dirname(NotebookState.PROJECT[]))
1515
elseif isdir(NotebookState.PROJECT[])
1616
cd(NotebookState.PROJECT[])
17-
elseif isdir(ed)
18-
cd(ed)
1917
else
2018
@warn "Project path not found: $(NotebookState.PROJECT[])"
2119
end
2220
else
23-
cd(abspath(ed))
21+
error("Quarto only accepts `file` or `project` as arguments to `execute-dir`, got `$ed`.")
2422
end
2523
else
2624
# Current directory should always start out as the directory of the

0 commit comments

Comments
 (0)