Skip to content

Cli: refuse an option that has no value - #63

Closed
vaibhavgupta443 wants to merge 1 commit into
ThatRecompDev:mainfrom
vaibhavgupta443:fix/cli-option-missing-value
Closed

vaibhavgupta443 wants to merge 1 commit into
ThatRecompDev:mainfrom
vaibhavgupta443:fix/cli-option-missing-value

Conversation

@vaibhavgupta443

Copy link
Copy Markdown

What

An option typed without its value was dropped, so the command ran without it:

  • archive carve ... --limit-mb carved with no limit.
  • audio export ... --codec --decode-xma took the flag as the codec, so the flag was lost.

Change

A missing value, or a next argument starting with --, now prints fivestar: <option> needs a value and exits with code 2.

This covers the argument reader used by archive, audio, exe, model, platform, profile, progress and texture. An unrecognised option at the end of the line, which was ignored before, is now refused too. The separate reader in FiveStar.Cli.Shader is unchanged.

How I checked

  • dotnet build FiveStar.slnx: 0 warnings, 0 errors.
  • FiveStar.Architecture.Tests: 31 passed.
  • FiveStar.Cli.Tests: 15 passed, 7 skipped.
  • Both cases of the new test failed before the fix.
  • No game files were used. The other test projects were not run locally.

An option typed without its value was dropped, so the command ran as if it had not been given: archive carve ... --limit-mb carved without a limit, and audio export ... --codec --decode-xma took the flag as the codec.
@vaibhavgupta443
vaibhavgupta443 deleted the fix/cli-option-missing-value branch November 26, 2026 19:46
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.

1 participant