Don't add '-' to gm-args starting with '+'

Now it's possible to pass a json string as { "gm-args": ["+profile *"] } to remove EXIF ​​from images.
pull/320/head
Vid0Vid0 1 year ago committed by Romain
parent e19885031e
commit 18b739ea23

@ -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

Loading…
Cancel
Save