Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 1, 2026

SimpleOptionsParser incorrectly consumed the next argument as a boolean flag's value when that argument used --option=value syntax. This caused --use-aviator --rel=myrelease to parse --rel=myrelease as the value for --use-aviator instead of treating it as a separate option.

Changes

  • SimpleOptionsParser.java: Added isOptionName() helper that extracts the option name prefix (before =) when checking if an argument is a known option
  • SimpleOptionsParserTest.java: Added test coverage for boolean flags followed by options using = syntax

Technical Details

The parser checked if nextArg exists in descriptorsByOptionNames to determine whether to consume it as a value. When nextArg was "--rel=myrelease", the map lookup failed because it only contained "--rel". The fix splits on = before the lookup:

private boolean isOptionName(String arg, Map<String, IOptionDescriptor> descriptorsByOptionNames) {
    var optionName = arg.split("=", 2)[0];
    return descriptorsByOptionNames.containsKey(optionName);
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Dorg.gradle.internal.worker.tmpdir=/home/REDACTED/work/fcli/fcli/fcli-core/fcli-common/build/tmp/test/work @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath1033484346184258515txt -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Test Executor 3&#39; (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

There seems to be an issue with parsing boolean flags in ActionCliOptionsProcessor.java, possibly in combination with how those options are passed through FcliCommandExecutor or run.fcli action instructions.

When running the FoD ci.yaml action with SETUP_EXTRA_OPTS=--use-aviator, user is experiencing an error saying that --rel option is not specified, which is passed by the ci.yaml action after the SETUP_EXTRA_OPTS env var value.

I think this is because somehow, the --rel=... argument is interpreted as the value of the --use-aviator option, rather than interpreting --use-aviator as a boolean flag and --rel=... as a separate option.

Please investigate and propose a fix.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate and fix boolean flags parsing issue Fix boolean flag parsing when followed by option with = syntax Feb 1, 2026
Copilot AI requested a review from rsenden February 1, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants