Skip to content

Commit

Permalink
Merge pull request #51 from Rian-Porfirio/fix/50-handle-no-args-errors
Browse files Browse the repository at this point in the history
Fix/50 handle no args errors
  • Loading branch information
feahnthor authored Jul 4, 2024
2 parents 03657a8 + ff93d97 commit bfb7622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Benny-Scraper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,17 @@ private static async Task HandleOptionsAsync(CommandLineOptions options)
int extension = (int)options.MangaExtension;
await SetDefaultMangaExtensionAsync(extension);
}
else if (string.Equals(options.SingleFile.ToLowerInvariant(), "y", StringComparison.OrdinalIgnoreCase) || string.Equals(options.SingleFile.ToLowerInvariant(), "n", StringComparison.OrdinalIgnoreCase))
else if (string.Equals(options.SingleFile?.ToLowerInvariant(), "y", StringComparison.OrdinalIgnoreCase) || string.Equals(options.SingleFile?.ToLowerInvariant(), "n", StringComparison.OrdinalIgnoreCase))
{
bool singleFile = options.SingleFile.ToLowerInvariant() == "y";
bool singleFile = options.SingleFile?.ToLowerInvariant() == "y";
await SetSingleFileAsync(singleFile);
}
else if (options.ExtensionType)
{
await GetDefaultMangaExtensionAsync();
}
else
Console.WriteLine("Invalid command. Please try again.");
Console.WriteLine("Invalid command or a parameter is missing. Please try again.");
}

private static async Task UpdateAllNovelsAsync(CancellationToken cancellation)
Expand Down

0 comments on commit bfb7622

Please sign in to comment.