diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 08:41:17 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 08:41:17 -0800 |
commit | 3d1f8affe066a360aea95c9c98470f41be99aa12 (patch) | |
tree | b2f2ae6d0024230f80253928431e28d3233ea0fa /src | |
parent | d1885bf686ab8814f35a2d79a34692cf18ca477e (diff) | |
download | DotNetOpenAuth-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.cs | 4 |
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."); |