{"record":{"id":"2bd7cfc6dfa40ebc","repo":"stablyai/orca","slug":"usage-node-config-scripts-verify-release-required","errorCode":null,"errorMessage":"Usage: node config/scripts/verify-release-required-assets.mjs <tag>","messagePattern":"Usage: node config/scripts/verify-release-required-assets\\.mjs <tag>","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/scripts/verify-release-required-assets.mjs","lineNumber":147,"sourceCode":"        empty.length > 0 ? `Empty: ${empty.join(', ')}` : null\n      ]\n        .filter(Boolean)\n        .join('\\n')\n    )\n  }\n\n  return {\n    tag,\n    checked: [...requiredNames].sort(),\n    draft: release.draft,\n    prerelease: release.prerelease\n  }\n}\n\nasync function main() {\n  const tag = process.argv[2]\n  if (!tag) {\n    throw new Error('Usage: node config/scripts/verify-release-required-assets.mjs <tag>')\n  }\n  const token = process.env.GH_TOKEN || process.env.GITHUB_TOKEN\n  if (!token) {\n    throw new Error('GH_TOKEN or GITHUB_TOKEN must be set')\n  }\n  const repo = process.env.GITHUB_REPOSITORY || 'stablyai/orca'\n  const result = await verifyRequiredReleaseAssets({ repo, tag, token })\n  console.log(`Verified ${result.checked.length} required release assets for ${repo}@${tag}`)\n}\n\nif (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {\n  main().catch((error) => {\n    console.error(error.message)\n    process.exit(1)\n  })\n}\n","sourceCodeStart":129,"sourceCodeEnd":164,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-release-required-assets.mjs#L129-L164","documentation":"Usage guard in main(): the script requires exactly one positional argument — the git tag to verify. With no argv[2] there is nothing to look up, so it aborts with the canonical invocation string rather than proceeding to a meaningless API call.","triggerScenarios":"Invoking the script with no arguments; invoking via a wrapper that swallows positional args; CI workflow step that passes the tag through an unset variable (e.g. an empty ${{ inputs.tag }}).","commonSituations":"Manual local run of the script without a tag; workflow yaml referencing an undefined input or output variable for the tag; shell quoting that collapses an empty tag to nothing.","solutions":["Pass the tag as the first positional argument: node config/scripts/verify-release-required-assets.mjs v1.2.3.","If running from a workflow, ensure the tag input/env var is populated before this step (e.g. echo the value in a prior step).","Add an explicit check in the workflow that the tag is non-empty before calling the script."],"exampleFix":"# before\nnode config/scripts/verify-release-required-assets.mjs\n# after\nnode config/scripts/verify-release-required-assets.mjs v1.2.3","handlingStrategy":"validation","validationCode":"# In the workflow step, guard before invoking:\n# - name: Verify release assets\n#   run: node config/scripts/verify-release-required-assets.mjs \"${{ inputs.tag }}\"\n#   if: inputs.tag != ''\n# Or in shell:\n[ -n \"$1\" ] || { echo 'tag required'; exit 2; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass the tag through a non-empty-checked variable.","Add an 'if: inputs.tag != \\'\\'' guard on the workflow step.","Document the exact invocation in the script's --help."],"tags":["usage","cli-args","ci-gate"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}