fix(args): resolve issue with short flag parsing in overrideArguments function
Some checks are pending
auto-documentation / documentation (push) Waiting to run
build and push docker image / build-node (push) Waiting to run
Style and build test / tsc (push) Waiting to run
Style and build test / eslint (push) Blocked by required conditions
Style and build test / prettier (push) Blocked by required conditions
Style and build test / build-test-windows-arm64 (push) Blocked by required conditions
Style and build test / build-test-linux-arm64 (push) Blocked by required conditions
Style and build test / build-test-macos-arm64 (push) Blocked by required conditions
Style and build test / build-test-windows-x64 (push) Blocked by required conditions
Style and build test / build-test-linux-x64 (push) Blocked by required conditions
Style and build test / build-test-macos-x64 (push) Blocked by required conditions

This commit is contained in:
stratumadev 2025-11-28 22:22:00 +01:00
parent c9ca51e6ef
commit 429bb2d690
3 changed files with 6 additions and 10 deletions

View file

@ -52,10 +52,6 @@ const SERVICES: Record<string, any> = {
const ids = makeCommand(argv.service);
for (const id of ids) {
overrideArguments(cfg.cli, id);
/* Reimport module to override appArgv */
// Object.keys(require.cache).forEach((key) => {
// if (key.endsWith('crunchy.js') || key.endsWith('hidive.js')) delete require.cache[key];
// });
const Service = SERVICES[argv.service];
if (!Service) {
console.error('Unknown service:', argv.service);

View file

@ -182,9 +182,9 @@ const overrideArguments = (cfg: { [key: string]: unknown }, override: Partial<ty
for (const [key, val] of Object.entries(override)) {
if (val === undefined) continue;
if (typeof val === 'boolean') {
if (val) baseArgv.push(`--${key}`);
if (val) baseArgv.push(key.length > 1 ? `--${key}` : `-${key}`);
} else {
baseArgv.push(`--${key}`, String(val));
baseArgv.push(key.length > 1 ? `--${key}` : `-${key}`, String(val));
}
}

View file

@ -406,8 +406,8 @@ packages:
resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/eslintrc@3.3.1':
resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==}
'@eslint/eslintrc@3.3.3':
resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/js@9.39.1':
@ -2219,7 +2219,7 @@ snapshots:
dependencies:
'@types/json-schema': 7.0.15
'@eslint/eslintrc@3.3.1':
'@eslint/eslintrc@3.3.3':
dependencies:
ajv: 6.12.6
debug: 4.4.3
@ -2866,7 +2866,7 @@ snapshots:
'@eslint/config-array': 0.21.1
'@eslint/config-helpers': 0.4.2
'@eslint/core': 0.17.0
'@eslint/eslintrc': 3.3.1
'@eslint/eslintrc': 3.3.3
'@eslint/js': 9.39.1
'@eslint/plugin-kit': 0.4.1
'@humanfs/node': 0.16.7