From bad42197d2e780d8aa64924f5df9e6b0a62ff5f6 Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Wed, 16 Sep 2020 05:49:27 -0400 Subject: [PATCH] allow pngquant to overwrite file --- Tuprules.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tuprules.lua b/Tuprules.lua index 4b8c12a0..1704dcd7 100644 --- a/Tuprules.lua +++ b/Tuprules.lua @@ -40,7 +40,8 @@ function compresspng(opts) compressopts(opts.config, copts) end if copts.pngquant then - cmds += rep{"pngquant ${opts} ${output}", opts=copts.pngquant, output=output} + -- -f -o necessary to overwrite existing file + cmds += rep{"pngquant -f -o ${output} ${opts} ${output}", opts=copts.pngquant, output=output} end if copts.optipng then cmds += rep{"optipng -q ${opts} ${output}", opts=copts.optipng, output=output}