affaan-m/ECC · error · Error

--timeout-ms must be a positive number

Error message

--timeout-ms must be a positive number

What it means

parseArgs validates the value given to --timeout-ms: it throws when the value is missing/NaN or <= 0. The faulting input is the numeric string following --timeout-ms; advisory-source fetching cannot proceed with a non-positive timeout.

Solutions

  1. Pass a positive integer, e.g. --timeout-ms 30000.
  2. Check the wrapping script for an empty or malformed variable expansion.
  3. Choose a timeout large enough for network advisory fetches.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/ci/supply-chain-advisory-sources.js:387 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/67d38e579d4f2df5. Report an issue: GitHub.

Appendix: source

Thrown at scripts/ci/supply-chain-advisory-sources.js:387

function parseArgs(argv) {
  const options = {};
  for (let i = 0; i < argv.length; i += 1) {
    const arg = argv[i];
    if (arg === '--help' || arg === '-h') {
      options.help = true;
    } else if (arg === '--json') {
      options.json = true;
    } else if (arg === '--refresh') {
      options.refresh = true;
    } else if (arg === '--strict-refresh') {
      options.strictRefresh = true;
      options.refresh = true;
    } else if (arg === '--generated-at') {
      options.generatedAt = argv[++i];
    } else if (arg === '--timeout-ms') {
      options.timeoutMs = Number(argv[++i]);
      if (!Number.isFinite(options.timeoutMs) || options.timeoutMs <= 0) {
        throw new Error('--timeout-ms must be a positive number');
      }
    } else if (arg === '--write') {
      options.writePath = argv[++i];
      if (!options.writePath) throw new Error('--write requires a path');
    } else {
      throw new Error(`Unknown argument: ${arg}`);
    }
  }
  return options;
}

function printHelp() {
  console.log(`Usage: node scripts/ci/supply-chain-advisory-sources.js [options]

Build the active supply-chain advisory source report used by the scheduled
watch workflow and Linear ITO-57 status updates.

Options:

View on GitHub (pinned to 8321021c54)