File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,24 @@ quarto_run <- function(
6969 },
7070 error = function (e ) {
7171 msg <- c(x = " Error running quarto cli." )
72+ # if there is an error message from quarto CLI, add it to the message
73+ if (e $ stderr != " " ) {
74+ quarto_error_msg <- xfun :: split_lines(e $ stderr )
75+ msg <- c(
76+ msg ,
77+ " " = paste0(rep(" -" , nchar(msg )), collapse = " " ),
78+ setNames(quarto_error_msg , rep(" " , length(quarto_error_msg )))
79+ )
80+ }
81+
82+ # if `--quiet` has been set, quarto CLI won't report any error (e$stderr will be empty)
83+ # So remind user to run without `--quiet` to see the full error message
7284 if (cli_arg_quiet() %in% args )
7385 msg <- c(
7486 msg ,
7587 " i" = " Rerun with `quiet = FALSE` to see the full error message."
7688 )
89+
7790 cli :: cli_abort(msg , call = .call , parent = e )
7891 }
7992 )
You can’t perform that action at this time.
0 commit comments