Skip to content

Commit

Permalink
Address feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaffinito committed Aug 1, 2023
1 parent 9a82eae commit 67f137d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions build/S3Validator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,11 @@ static void Main(string[] args)

var version = result.Value.Version;
var configuration = LoadConfiguration(result.Value.ConfigurationPath);
var isValid = Validate(version, configuration);
if (!isValid)
{
ExitWithError(ExitCode.Error, "Validation failed for an unknown reason.");
}

Validate(version, configuration);
Console.WriteLine("Valid.");
}

private static bool Validate(string version, Configuration configuration)
private static void Validate(string version, Configuration configuration)
{
var tasks = new List<Task<HttpResponseMessage>>();
foreach (var dir in configuration.DirectoryList!)
Expand All @@ -44,7 +39,7 @@ private static bool Validate(string version, Configuration configuration)

if (!tasks.Any())
{
return false;
ExitWithError(ExitCode.Error, "There was nothing to validate.");
}

var taskCompleted = Task.WaitAll(tasks.ToArray(), 10000);
Expand Down Expand Up @@ -77,8 +72,6 @@ private static bool Validate(string version, Configuration configuration)
{
ExitWithError(ExitCode.Error, "Validation failed. Results:" + Environment.NewLine + string.Join(Environment.NewLine, results));
}

return isValid;
}

private static void ValidateOptions(Options opts)
Expand Down

0 comments on commit 67f137d

Please sign in to comment.