SabreTools / MPF

Redumper/Aaru/DiscImageCreator GUI in C#
GNU General Public License v3.0
437 stars 34 forks source link

[Problem] MPF.CLI expects more arguments than required #737

Closed Daja177 closed 3 months ago

Daja177 commented 3 months ago

Version What version are you using?

Build What runtime version are you using?

Describe the issue MPF.CLI expects 4 or more arguments to be able to run, otherwise the program exits with the output: "Not enough arguments have been provided, exiting..." This is despite the help output implying media type and system type are the only absolutely required arguments. https://github.com/SabreTools/MPF/blob/11b8dd44bbb25067ba59fcd0855ba64bca74be3c/MPF.CLI/Program.cs#L43C13-L43C33

Even if MPF.CLI requires device path and file path or custom parameters at this stage, even without this check it's able to tell if device path hasn't been supplied (and file path once #736 is fixed). Reducing this number from 4 to 2 would result in more helpful error messages like "Both a device path and file path need to be supplied, exiting..." instead of the generic "Not enough arguments have been provided, exiting..."

To Reproduce Steps to reproduce the behavior:

  1. Run MPF.CLI with required arguments media type and system type supplied and no other arguments
  2. See error "Not enough arguments have been provided, exiting..."

Expected behavior Not getting this error when the required arguments have been provided, or getting an error specifying what exactly is missing, such as "Both a device path and file path need to be supplied, exiting..."