NationalSecurityAgency/ghidra · error · IllegalArgumentException

Unsupported option specification: {}=

Error message

Unsupported option specification: {}=

What it means

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.

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java:286

			if (optionName.startsWith("-") && !optionName.startsWith("--")) {
				option = SHORTCUT_OPTION_MAP.get(optionName); // map option to -- long form
				if (option == null) {
					throw new IllegalArgumentException("Unsupported option use: " + optionName);
				}
			}

			if (!option.startsWith("--")) {
				throw new IllegalArgumentException("Unexpected argument: " + option);
			}

			if (!GLOBAL_OPTIONS.contains(option) && !allowedParams.contains(option)) {
				throw new IllegalArgumentException("Unsupported option use: " + optionName);
			}

			if (!VALUE_OPTIONS.contains(option)) {
				// option without value arg
				if (value != null) {
					throw new IllegalArgumentException(
						"Unsupported option specification: " + optionName + "=");
				}
			}
			else if (StringUtils.isBlank(value)) {
				// consume next param as option value
				if (++i == params.length) {
					throw new IllegalArgumentException("Missing option value: " + optionName);
				}
				value = params[i];
			}

			switch (option) {
				case PORT_OPTION:
					port = parsePositiveIntegerOption(optionName, value);
					break;
				case USER_OPTION:
					connectingUserName = value;
					break;

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Drop the `=value` portion: use `--force` by itself.
  2. Confirm whether the option is a flag by checking VALUE_OPTIONS in source.
  3. Use --help to distinguish flags from value-taking options.

Example fix

// before
bsim control configure host --force=true
// after
bsim control configure host --force
Defensive patterns

Strategy: validation

Validate before calling

// Flags (non-VALUE_OPTIONS) must never carry an =value.
if (token.contains("=")) {
    String name = token.substring(0, token.indexOf('='));
    if (!VALUE_OPTIONS.contains(name)) {
        System.err.println(name + " is a flag and takes no value; remove '=...'");
        return;
    }
}

Try / catch

try {
    launchable.readOptions(command, params, discard);
} catch (IllegalArgumentException e) {
    if (e.getMessage().startsWith("Unsupported option specification:")) {
        System.err.println("That option is a flag; drop the =value.");
    }
    throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: Treating a boolean flag like a key/value option, or copy-pasting from a config-file format that uses `=`.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/3c0be8fb63b62f4d. Report an issue: GitHub.