summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:41:17 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:41:17 -0800
commit3d1f8affe066a360aea95c9c98470f41be99aa12 (patch)
treeb2f2ae6d0024230f80253928431e28d3233ea0fa /src
parentd1885bf686ab8814f35a2d79a34692cf18ca477e (diff)
downloadDotNetOpenAuth-3d1f8affe066a360aea95c9c98470f41be99aa12.zip
DotNetOpenAuth-3d1f8affe066a360aea95c9c98470f41be99aa12.tar.gz
DotNetOpenAuth-3d1f8affe066a360aea95c9c98470f41be99aa12.tar.bz2
Fixed build break that appears when the .git directory is not found.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
index 3124065..b4de743 100644
--- a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
+++ b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
@@ -59,7 +59,9 @@ namespace DotNetOpenAuth.BuildTasks {
string refName = headContent.Substring(5).Trim();
headContent = File.ReadAllText(Path.Combine(this.GitRepoRoot, @".git/" + refName)).Trim();
}
- } catch (FileNotFoundException) { }
+ } catch (FileNotFoundException) {
+ } catch (DirectoryNotFoundException) {
+ }
if (string.IsNullOrEmpty(headContent)) {
Log.LogWarning("Unable to determine the git HEAD commit ID to use for informational version number.");