Skip to content

[Bug]: InfoCommand checks --to version after loading bootstrap #206

@Splatcrafter

Description

@Splatcrafter

AI REVIEWED

Module: cli
File: cli/command/InfoCommand.java (~line 190-195)
Severity: Medium

Summary

The --to version null check occurs after the bootstrap class is loaded. If --to is missing, the expensive class loading was wasted.

Suggested Fix

Check required parameters before loading bootstrap:

if (this.toVersion == null) {
    System.err.println("Error: --to version is required when using --bootstrap");
    return 1;
}
final DataFixerBootstrap bootstrap = BootstrapLoader.load(this.bootstrapClass);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions