From c4e43f07f9cd770007a3033904ac52c1a70c53cf Mon Sep 17 00:00:00 2001 From: Josh Mock Date: Wed, 8 Nov 2023 13:07:55 -0600 Subject: [PATCH] Fix arg-parsing issue in codegen script (#2068) (cherry picked from commit b7b16d81ee3bdeafbaad393801bda4abfa30fe78) --- .ci/make.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.ci/make.mjs b/.ci/make.mjs index 305f066e2..33627bab6 100644 --- a/.ci/make.mjs +++ b/.ci/make.mjs @@ -28,6 +28,11 @@ import assert from 'assert' import { join } from 'desm' import semver from 'semver' +// xz/globals loads minimist-parsed args as a global `argv`, but it +// interprets args like '8.10' as numbers and shortens them to '8.1'. +// so we have to import and configure minimist ourselves. +import minimist from 'minimist' +const argv = minimist(process.argv.slice(2), { string: ['_', 'task'] }) assert(typeof argv.task === 'string', 'Missing task parameter') switch (argv.task) {