From 3113fcce23b8fc29105d5173de60fac46f59b06e Mon Sep 17 00:00:00 2001 From: Matthew Manela Date: Sat, 19 Dec 2015 06:29:29 -0800 Subject: [PATCH] Throw exception if cannot resolve compile source directory --- Chutzpah/ChutzpahTestSettingsService.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Chutzpah/ChutzpahTestSettingsService.cs b/Chutzpah/ChutzpahTestSettingsService.cs index f32668e6..b08d16c7 100644 --- a/Chutzpah/ChutzpahTestSettingsService.cs +++ b/Chutzpah/ChutzpahTestSettingsService.cs @@ -317,7 +317,13 @@ private void ResolveBatchCompileConfiguration(ChutzpahTestSettingsFile settings, } // These settings might be needed in either External - settings.Compile.SourceDirectory = ResolveFolderPath(settings, settings.Compile.SourceDirectory); + var sourceDir = settings.Compile.SourceDirectory; + settings.Compile.SourceDirectory = ResolveFolderPath(settings, sourceDir); + if(settings.Compile.SourceDirectory == null) + { + throw new DirectoryNotFoundException("Unable to find directory specified by Compile SourceDirectory setting of " + (sourceDir ?? "")); + } + settings.Compile.OutDirectory = ResolveFolderPath(settings, ExpandVariable(chutzpahVariables, settings.Compile.OutDirectory), true); } }