avoid ansi color characters from being printed
authorZhian N. Kamvar <zkamvar@gmail.com>
Wed, 6 Jan 2021 02:08:35 +0000 (18:08 -0800)
committerFrançois Michonneau <francois.michonneau@gmail.com>
Wed, 6 Jan 2021 14:08:17 +0000 (15:08 +0100)
bin/generate_md_episodes.R

index ce9e8aa63bd0a295ccb76a25150629e383aefba5..7fb4c5a53312c9546c1a8b18d111c1b1a6cce8e2 100644 (file)
@@ -1,5 +1,9 @@
 generate_md_episodes <- function() {
 
+  # avoid ansi color characters from being printed in the output
+  op <- options()
+  on.exit(options(op), add = TRUE)
+  options(crayon.enabled = FALSE)
   ## get the Rmd file to process from the command line, and generate the path
   ## for their respective outputs
   args  <- commandArgs(trailingOnly = TRUE)