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

Open
opened 2026-01-29 16:21:26 +00:00 by claunia · 0 comments
Owner

Originally created by @Daja177 on GitHub (Aug 16, 2024).

Originally assigned to: @mnadareski on GitHub.

Version
What version are you using?

  • Stable release (v3.2.1)
  • WIP release (version here)

Build
What runtime version are you using?

  • .NET 6.0 running on (Operating System)
  • .NET 8.0 running on Linux

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.
11b8dd44bb/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..."

Originally created by @Daja177 on GitHub (Aug 16, 2024). Originally assigned to: @mnadareski on GitHub. **Version** What version are you using? - [x] Stable release (v3.2.1) - [ ] WIP release (version here) **Build** What runtime version are you using? - [ ] .NET 6.0 running on (Operating System) - [x] .NET 8.0 running on Linux **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..."
claunia added the bug label 2026-01-29 16:21:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#734