Fix minimum number of args checks

This commit is contained in:
Matt Nadareski
2024-06-25 16:37:26 -04:00
parent dd5b5d4c7d
commit 7c87a22dcc
2 changed files with 4 additions and 3 deletions

View File

@@ -28,6 +28,7 @@
- Ensure tracks are assigned in Aaru
- Custom theme colors
- Use speed for CLI from configuration
- Fix minimum number of args checks
### 3.2.0 (2024-06-20)

View File

@@ -38,7 +38,7 @@ namespace MPF.CLI
}
// Check for the minimum number of arguments
if (args.Length < 5)
if (args.Length < 4)
{
DisplayHelp("Not enough arguments have been provided, exiting...");
return;
@@ -131,8 +131,8 @@ namespace MPF.CLI
string? paramStr = env.GetFullParameters(speed);
// Process custom parameters
if (args.Length > 5)
paramStr = string.Join(" ", args.Skip(5).ToArray());
if (args.Length > 4)
paramStr = string.Join(" ", args.Skip(4).ToArray());
if (string.IsNullOrEmpty(paramStr))
{