Skip to content

Commit

Permalink
[xbuild] We still need to throw if we fail to import something.
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Apr 26, 2012
1 parent d915e62 commit 256094a
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -162,6 +162,8 @@ string GetFullPath ()
base_dir_info = new DirectoryInfo (Directory.GetCurrentDirectory ());

IEnumerable<string> extn_paths = has_extn_ref ? GetExtensionPaths (project) : new string [] {null};
bool import_needed = false;

try {
foreach (string path in extn_paths) {
string extn_msg = null;
Expand All @@ -175,6 +177,8 @@ string GetFullPath ()
if (!ConditionParser.ParseAndEvaluate (condition_attribute, project))
continue;

import_needed = true;

// We stop if atleast one file got imported.
// Remaining extension paths are *not* tried
bool atleast_one = false;
Expand All @@ -196,6 +200,9 @@ string GetFullPath ()
if (has_extn_ref)
project.SetExtensionsPathProperties (Project.DefaultExtensionsPath);
}

if (import_needed)
throw new InvalidProjectFileException (String.Format ("{0} could not import \"{1}\"", importingFile, project_attribute));
}

// Parses the Project attribute from an Import,
Expand Down

0 comments on commit 256094a

Please sign in to comment.