Skip to content

Commit

Permalink
Validate options before touching the disk
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillOsenkov committed Apr 20, 2024
1 parent dcf2905 commit 9e7dbab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ILRepack/ILRepack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ void PrintRepackHeader()
/// </summary>
public void Repack()
{
Options.Validate();

string outputFilePath = Options.OutputFile;
var outputDir = Path.GetDirectoryName(outputFilePath);
var tempOutputDirectory = Path.Combine(outputDir, $"ILRepack-{Process.GetCurrentProcess().Id}-{DateTime.UtcNow.Ticks.ToString().Substring(12)}");
Expand Down Expand Up @@ -311,7 +313,6 @@ private void RepackCore(string tempOutputDirectory)
{
var timer = new Stopwatch();
timer.Start();
Options.Validate();
MergedAssemblyFiles = Options.ResolveFiles();
foreach (var inputFile in MergedAssemblyFiles)
{
Expand Down

0 comments on commit 9e7dbab

Please sign in to comment.