diff --git a/FFMP.cs b/FFMP.cs index f2a5a9f..453fbfa 100644 --- a/FFMP.cs +++ b/FFMP.cs @@ -90,12 +90,15 @@ static void Main(string[] args) }) .WithNotParsed(errors => { - Console.WriteLine("Failed to parse arguments."); - foreach (var error in errors) + // Check if the user requested help/version information + if (errors.Any(error => error is CommandLine.HelpRequestedError || error is CommandLine.VersionRequestedError)) { - Console.WriteLine(error.ToString()); + Environment.Exit(0); // Exit without error message } + // Otherwise, print an actual error message + Console.WriteLine("Error: Invalid arguments provided."); + Environment.Exit(1); }); }