diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-28 14:46:06 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-01 16:00:52 -0300 |
commit | 75a7b56d3616d384b31757c9537a6e27f4e9b350 (patch) | |
tree | b55bd29dd02ba3613437e687187d7e92024aad52 /src | |
parent | 2d1eaf5ea4c46527406df527f1b4d2fc36d8566e (diff) |
upd8: accept and pass --magick-threads through properly
Diffstat (limited to 'src')
-rwxr-xr-x | src/upd8.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/upd8.js b/src/upd8.js index 2f08204a..2ec231c9 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -233,6 +233,12 @@ async function main() { 'magick-threads': { help: `Process more or fewer thumbnail files at once with ImageMagick when generating thumbnails. (Each ImageMagick thread may also make use of multi-core processing at its own utility.)`, + type: 'value', + validate(threads) { + if (parseInt(threads) !== parseFloat(threads)) return 'an integer'; + if (parseInt(threads) < 0) return 'a counting number or zero'; + return true; + } }, magick: {alias: 'magick-threads'}, |