Skip to content

Commit a30df59

Browse files
authored
only support "file" and "project" options for execute-dir
1 parent 3cffbfb commit a30df59

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
@@ -2,7 +2,7 @@ function refresh!(path, original_options, options = original_options)
22
# We check the `execute-dir` key in the options,
33
if haskey(options, "project") && haskey(options["project"], "execute-dir")
44
ed = options["project"]["execute-dir"]
5-
if ed == "directory"
5+
if ed == "file"
66
cd(dirname(path))
77
elseif ed == "project"
88
# TODO: this doesn't seem right. How does one get the root path of the project here?
@@ -12,13 +12,11 @@ function refresh!(path, original_options, options = original_options)
1212
cd(dirname(NotebookState.PROJECT[]))
1313
elseif isdir(NotebookState.PROJECT[])
1414
cd(NotebookState.PROJECT[])
15-
elseif isdir(ed)
16-
cd(ed)
1715
else
1816
@warn "Project path not found: $(NotebookState.PROJECT[])"
1917
end
2018
else
21-
cd(abspath(ed))
19+
error("Quarto only accepts `file` or `project` as arguments to `execute-dir`, got `$ed`.")
2220
end
2321
else
2422
# Current directory should always start out as the directory of the

0 commit comments

Comments
 (0)