From 9e7dbab4e5c359a000e64b57d28528794be4cb77 Mon Sep 17 00:00:00 2001 From: Kirill Osenkov Date: Sat, 20 Apr 2024 16:37:44 -0700 Subject: [PATCH] Validate options before touching the disk --- ILRepack/ILRepack.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ILRepack/ILRepack.cs b/ILRepack/ILRepack.cs index 44f906d0..7ddfa044 100644 --- a/ILRepack/ILRepack.cs +++ b/ILRepack/ILRepack.cs @@ -283,6 +283,8 @@ void PrintRepackHeader() /// 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)}"); @@ -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) {