{"record":{"id":"9e9b1d0023f901a1","repo":"affaan-m/ECC","slug":"write-requires-a-path","errorCode":null,"errorMessage":"--write requires a path","messagePattern":"--write requires a path","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/supply-chain-advisory-sources.js","lineNumber":391,"sourceCode":"    if (arg === '--help' || arg === '-h') {\n      options.help = true;\n    } else if (arg === '--json') {\n      options.json = true;\n    } else if (arg === '--refresh') {\n      options.refresh = true;\n    } else if (arg === '--strict-refresh') {\n      options.strictRefresh = true;\n      options.refresh = true;\n    } else if (arg === '--generated-at') {\n      options.generatedAt = argv[++i];\n    } else if (arg === '--timeout-ms') {\n      options.timeoutMs = Number(argv[++i]);\n      if (!Number.isFinite(options.timeoutMs) || options.timeoutMs <= 0) {\n        throw new Error('--timeout-ms must be a positive number');\n      }\n    } else if (arg === '--write') {\n      options.writePath = argv[++i];\n      if (!options.writePath) throw new Error('--write requires a path');\n    } else {\n      throw new Error(`Unknown argument: ${arg}`);\n    }\n  }\n  return options;\n}\n\nfunction printHelp() {\n  console.log(`Usage: node scripts/ci/supply-chain-advisory-sources.js [options]\n\nBuild the active supply-chain advisory source report used by the scheduled\nwatch workflow and Linear ITO-57 status updates.\n\nOptions:\n  --json              Emit JSON instead of text\n  --refresh           Check source URLs and record warning status\n  --strict-refresh    Fail when a refreshed source URL returns a warning\n  --generated-at <ts> Override the report timestamp","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/supply-chain-advisory-sources.js#L373-L409","documentation":"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.","triggerScenarios":"Thrown at scripts/ci/supply-chain-advisory-sources.js:391 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}