{"record":{"id":"f04f067980e6af2c","repo":"saadeghi/daisyui","slug":"unknown-option-argument","errorCode":null,"errorMessage":"Unknown option: ${argument}","messagePattern":"Unknown option: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":104,"sourceCode":"        break\n      }\n      case \"--headed\":\n        options.headed = true\n        break\n      case \"--verbose\":\n        options.verbose = true\n        break\n      case \"--help\":\n      case \"-h\":\n        options.help = true\n        break\n      case \"--\":\n        positional.push(...argv.slice(index + 1))\n        index = argv.length\n        break\n      default:\n        if (argument.startsWith(\"-\")) {\n          throw new Error(`Unknown option: ${argument}`)\n        }\n        positional.push(argument)\n    }\n  }\n\n  if (options.html !== undefined && options.htmlFile !== undefined) {\n    throw new Error(\"Use either --html or --html-file, not both\")\n  }\n  if (options.css !== undefined && options.cssFile !== undefined) {\n    throw new Error(\"Use either --css or --css-file, not both\")\n  }\n\n  if (options.html === undefined && options.htmlFile === undefined && positional.length > 0) {\n    options.html = positional.shift()\n  }\n  if (options.css === undefined && options.cssFile === undefined && positional.length > 0) {\n    options.css = positional.shift()\n  }","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L86-L122","documentation":"During argv parsing any token starting with `-` that does not match a known case (--html, --css, --html-file, --css-file, --browser, --timeout, --headed, --verbose, --help/-h, --) falls through to the default and throws. Only bare positional tokens (no leading dash) are tolerated as unknown.","triggerScenarios":"A misspelled flag like `--htm` or `--html-fiel`; an unsupported short flag like `-x`; a value that itself starts with `-` placed where a flag is expected.","commonSituations":"Typo in the flag name; copy-paste from a different tool's CLI; a negative-number positional accidentally parsed as a flag.","solutions":["Run with --help to see the accepted flags.","Correct the flag spelling.","If a positional value starts with `-`, place it after `--`."],"exampleFix":"# before\nbun .../index.mjs --htm '<div/>'\n# after\nbun .../index.mjs --html '<div/>'","handlingStrategy":"validation","validationCode":"const known = new Set(['--html','--css','--html-file','--css-file','--browser','--timeout','--headed','--verbose','--help','-h','--'])\nconst unknown = argv.filter(a => a.startsWith('-') && !known.has(a))\nif (unknown.length) throw new Error(`Unknown option: ${unknown[0]}`)","typeGuard":"const isKnownOption = (a) => !a.startsWith('-') || known.has(a)","tryCatchPattern":null,"preventionTips":["Run with --help to confirm flag names.","If a positional value starts with '-', put it after '--'.","Avoid abbreviating flag names."],"tags":["cli","argument","parsing"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}