Skip to content

Commit 23ffaab

Browse files
committed
silence optipng messages by default per CRAN request
1 parent 3f7e2c1 commit 23ffaab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# CHANGES IN knitr VERSION 1.51
22

3+
- `hook_optipng()` now uses the `-quiet` argument of `optipng` to suppress the messages by default.
34

45
# CHANGES IN knitr VERSION 1.50
56

R/hooks-extra.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ hook_png = function(
8080
opts = options[[cmd]]
8181
if (isFALSE(opts)) return()
8282
if (is.null(opts) || isTRUE(opts)) opts = switch(
83-
cmd, pngquant = '--skip-if-larger', mogrify = '-trim'
83+
cmd, optipng = '-quiet', pngquant = '--skip-if-larger', mogrify = '-trim'
8484
)
8585
if (cmd == 'pngquant') opts = c(opts, '--ext', '-fs8.png')
8686

0 commit comments

Comments
 (0)