Skip to main content
FORGEJO ERA / ISSUE #634

CLI instance creation does not report raw options.txt lines that were not written

closedOpened by MelanX on

Original description​

By MelanX · October 25, 2026

Crate: ephervex-cli

Behavior

When a client instance is created or imported, the raw options.txt lines from the Minecraft defaults (minecraft_raw_options in the configuration, #630) are applied after the managed preferences. A line that cannot be an options.txt line (no : separator, an empty key, a control character, or the version data-version line) is not written and is listed in PreferenceApplication::raw_lines_rejected, with raw_lines_applied counting the lines that were written.

The CLI creation report ignores both. The human output after print_instance in crates/cli/src/main.rs prints unsupported, unknown and skipped managed preferences, and preferences_applied_json serializes the same fields, but neither mentions rejected raw lines or the applied count. Core only logs a warning. The GUI shows rejected lines while the user types, but a user who edited config.toml by hand or who scripts the CLI gets no feedback that a line was dropped, although #630 requires a malformed line to be reported to the user.

The messages preferences-raw-line-missing-separator, -empty-key, -control-character and -data-version already exist in crates/i18n/locales/en-US/main.ftl.

Expected behavior

  • Human output prints one line per rejected raw line using RawLineProblem::message_id() with its line number.
  • JSON output includes the rejected lines (line number and problem) and raw_lines_applied.

Verified at 8ce3ae9a.