Skip to content

Commit

Permalink
Validate options before calling ILRepack
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillOsenkov committed Apr 20, 2024
1 parent f8cec12 commit dcf2905
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ILRepack/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ static int Main(string[] args)
Exit(2);
}

try
{
options.Validate();
}
catch (Exception argumentException)
{
Console.Error.WriteLine(argumentException.Message);
Usage();
return -2;
}

ILRepack repack = new ILRepack(options, logger);
repack.Repack();
returnCode = 0;
Expand Down

0 comments on commit dcf2905

Please sign in to comment.