From 18b739ea23a99cd50145396d6a469b11e167c7dd Mon Sep 17 00:00:00 2001 From: Vid0Vid0 <25650787+Vid0Vid0@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:37:33 +0200 Subject: [PATCH] Don't add '-' to gm-args starting with '+' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now it's possible to pass a json string as { "gm-args": ["+profile *"] } to remove EXIF ​​from images. --- src/cli/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/options.js b/src/cli/options.js index 304aefc..4df631f 100644 --- a/src/cli/options.js +++ b/src/cli/options.js @@ -499,7 +499,7 @@ exports.get = (args) => { // Add a dash prefix to any --gm-args value // We can't specify the prefix on the CLI otherwise the parser thinks it's a thumbsup arg if (opts.gmArgs) { - opts.gmArgs = opts.gmArgs.map(val => `-${val}`) + opts.gmArgs = opts.gmArgs.map(val => val.startsWith('+') ? val : `-${val}`) } return opts