affaan-m/ECC · error · Error
--write requires a path
Error message
--write requires a path
What it means
parseArgs throws when --write is given without a following path argument. The write mode needs an explicit output path for the refreshed advisory cache, and an absent or flag-like next token cannot serve as one.
Solutions
- Provide the output path: --write <path/to/advisory-cache.json>.
- Drop --write if only reading/caching in memory is intended.
- Check that the path value was not accidentally placed before the flag.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at scripts/ci/supply-chain-advisory-sources.js:391 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/9e9b1d0023f901a1.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/ci/supply-chain-advisory-sources.js:391
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:
--json Emit JSON instead of text
--refresh Check source URLs and record warning status
--strict-refresh Fail when a refreshed source URL returns a warning
--generated-at <ts> Override the report timestampView on GitHub (pinned to 8321021c54)