File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,10 @@ process_file = function(text, output) {
311311 res [i ] = xfun ::: handle_error(
312312 withCallingHandlers(
313313 if (tangle ) process_tangle(group ) else process_group(group ),
314- error = function (e ) if (xfun :: pkg_available(' rlang' , ' 1.0.0' )) rlang :: entrace(e )
314+ error = function (e ) {
315+ if (progress && is.function(pb $ interrupt )) pb $ interrupt()
316+ if (xfun :: pkg_available(' rlang' , ' 1.0.0' )) rlang :: entrace(e )
317+ }
315318 ),
316319 function (loc ) {
317320 setwd(wd )
Original file line number Diff line number Diff line change @@ -1136,6 +1136,7 @@ txt_pb = function(total, labels) {
11361136 setTxtProgressBar(pb , i )
11371137 cat_line(s [i ]) # append chunk label to the progress bar
11381138 },
1139+ interrupt = function () message(' \n ' ),
11391140 done = function () {
11401141 # wipe the progress bar
11411142 cat_line(' \r ' , strrep(' ' , max(w2 , 10 ) + 10 + n ))
You can’t perform that action at this time.
0 commit comments