aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/CommandLine/BuildCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/CommandLine/BuildCommand.cs')
-rw-r--r--src/WixToolset.Core/CommandLine/BuildCommand.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs
index b83aaec4..7e6ddd64 100644
--- a/src/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -377,18 +377,18 @@ namespace WixToolset.Core.CommandLine
377 context.SourcePath = sourcePath; 377 context.SourcePath = sourcePath;
378 context.Variables = preprocessorVariables; 378 context.Variables = preprocessorVariables;
379 379
380 XDocument document = null; 380 IPreprocessResult result = null;
381 try 381 try
382 { 382 {
383 var preprocessor = this.ServiceProvider.GetService<IPreprocessor>(); 383 var preprocessor = this.ServiceProvider.GetService<IPreprocessor>();
384 document = preprocessor.Preprocess(context); 384 result = preprocessor.Preprocess(context);
385 } 385 }
386 catch (WixException e) 386 catch (WixException e)
387 { 387 {
388 this.Messaging.Write(e.Error); 388 this.Messaging.Write(e.Error);
389 } 389 }
390 390
391 return document; 391 return result?.Document;
392 } 392 }
393 393
394 private class CommandLine 394 private class CommandLine