{"record":{"id":"e763bf5d0a5421f8","repo":"NationalSecurityAgency/ghidra","slug":"unsupported-option-specification-e763bf","errorCode":null,"errorMessage":"Unsupported option specification: {}=","messagePattern":"Unsupported option specification: (.+?)=","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"warning","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java","lineNumber":337,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!option.startsWith(\"--\")) {\n\t\t\t\tif (sawOptions) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Unexpected argument: \" + option);\n\t\t\t\t}\n\t\t\t\tsubParams.add(params[i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tsawOptions = true;\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\t\t\tif (!VALUE_OPTIONS.contains(option)) {\n\t\t\t\t// consume option without value arg as a boolean option\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\tbooleanOptions.add(option);\n\t\t\t}\n\t\t\telse if (!StringUtils.isBlank(value)) {\n\t\t\t\toptionValueMap.put(option, value);\n\t\t\t}\n\t\t\telse {\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\toptionValueMap.put(option, params[i]);\n\t\t\t}\n\t\t}\n\t\treturn subParams;\n\t}\n","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java#L319-L355","documentation":"Thrown when a boolean option (one not in VALUE_OPTIONS) is assigned a value using the = syntax. Boolean options like --commit, --overwrite, --nocallgraph, --force, --date, --printselfsig, --callgraph, --printjustexe, --includelibs do not accept values; their presence alone enables them.","triggerScenarios":"Using the --option=value syntax with a boolean flag, e.g., '--commit=true', '--force=yes', or '--overwrite=1'. The parser detects the = sign and rejects the value assignment for a non-value option.","commonSituations":"Habitually using key=value syntax for all options; migrating from a tool that accepts boolean values; misunderstanding which options take values vs. which are toggles.","solutions":["Remove the value from the boolean option: use '--commit' instead of '--commit=true'.","Check VALUE_OPTIONS (lines 100-103) to determine which options accept values.","Use the bare flag form for all boolean options."],"exampleFix":"// before\nbsim generatesigs ghidra://server/Repo --bsim h2://localhost/db --overwrite=true\n// error: Unsupported option specification: --overwrite=\n\n// after\nbsim generatesigs ghidra://server/Repo --bsim h2://localhost/db --overwrite","handlingStrategy":"validation","validationCode":"Set<String> booleanOptions = Set.of(\"--commit\",\"--date\",\"--nocallgraph\",\"--overwrite\",\"--includelibs\",\"--printselfsig\",\"--callgraph\",\"--printjustexe\",\"--force\");\nfor (String arg : args) {\n    if (arg.contains(\"=\")) {\n        String optName = arg.substring(0, arg.indexOf(\"=\"));\n        if (booleanOptions.contains(optName)) {\n            throw new IllegalArgumentException(\"Boolean option \" + optName + \" does not accept a value\");\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use bare flag syntax for boolean options (--commit, not --commit=true).","Check VALUE_OPTIONS to distinguish value-requiring options from boolean flags.","Avoid habitual key=value syntax for all options."],"tags":["bsim","ghidra","command-line","argument-parsing","cli-usage"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}