{"record":{"id":"3c0be8fb63b62f4d","repo":"NationalSecurityAgency/ghidra","slug":"unsupported-option-specification","errorCode":null,"errorMessage":"Unsupported option specification: {}=","messagePattern":"Unsupported option specification: (.+?)=","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java","lineNumber":286,"sourceCode":"\t\t\tif (optionName.startsWith(\"-\") && !optionName.startsWith(\"--\")) {\n\t\t\t\toption = SHORTCUT_OPTION_MAP.get(optionName); // map option to -- long form\n\t\t\t\tif (option == null) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Unsupported option use: \" + optionName);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!option.startsWith(\"--\")) {\n\t\t\t\tthrow new IllegalArgumentException(\"Unexpected argument: \" + option);\n\t\t\t}\n\n\t\t\tif (!GLOBAL_OPTIONS.contains(option) && !allowedParams.contains(option)) {\n\t\t\t\tthrow new IllegalArgumentException(\"Unsupported option use: \" + optionName);\n\t\t\t}\n\n\t\t\tif (!VALUE_OPTIONS.contains(option)) {\n\t\t\t\t// option without value arg\n\t\t\t\tif (value != null) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"Unsupported option specification: \" + optionName + \"=\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (StringUtils.isBlank(value)) {\n\t\t\t\t// consume next param as option value\n\t\t\t\tif (++i == params.length) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Missing option value: \" + optionName);\n\t\t\t\t}\n\t\t\t\tvalue = params[i];\n\t\t\t}\n\n\t\t\tswitch (option) {\n\t\t\t\tcase PORT_OPTION:\n\t\t\t\t\tport = parsePositiveIntegerOption(optionName, value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase USER_OPTION:\n\t\t\t\t\tconnectingUserName = value;\n\t\t\t\t\tbreak;","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java#L268-L304","documentation":"Thrown when an option that does not take a value (not present in VALUE_OPTIONS) is assigned one using the `--option=value` syntax. Flag/boolean options accept no value, so attaching one is rejected at line 286.","triggerScenarios":"Writing `--force=true` or `--no-local-auth=1` where the option is a flag (not in VALUE_OPTIONS), causing the parser to see a non-null value on a value-less option.","commonSituations":"Treating a boolean flag like a key/value option, or copy-pasting from a config-file format that uses `=`.","solutions":["Drop the `=value` portion: use `--force` by itself.","Confirm whether the option is a flag by checking VALUE_OPTIONS in source.","Use --help to distinguish flags from value-taking options."],"exampleFix":"// before\nbsim control configure host --force=true\n// after\nbsim control configure host --force","handlingStrategy":"validation","validationCode":"// Flags (non-VALUE_OPTIONS) must never carry an =value.\nif (token.contains(\"=\")) {\n    String name = token.substring(0, token.indexOf('='));\n    if (!VALUE_OPTIONS.contains(name)) {\n        System.err.println(name + \" is a flag and takes no value; remove '=...'\");\n        return;\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    launchable.readOptions(command, params, discard);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unsupported option specification:\")) {\n        System.err.println(\"That option is a flag; drop the =value.\");\n    }\n    throw e;\n}","preventionTips":["Treat boolean flags as presence-only; never append =value.","Distinguish flags from value-options in help output.","Validate that only VALUE_OPTIONS may use the =value syntax."],"tags":["cli","argument-validation","bsim"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}