Don't read commit file if it doesn't exist

This commit is contained in:
Pranav K 2016-10-14 09:36:29 -07:00
parent 8a2c0ecec1
commit 6317ea30c6
1 changed files with 4 additions and 1 deletions

View File

@ -248,7 +248,10 @@ var buildTarget = "compile"
if (Environment.GetEnvironmentVariable("KOREBUILD_ADD_ASSEMBLY_INFO") == "1") if (Environment.GetEnvironmentVariable("KOREBUILD_ADD_ASSEMBLY_INFO") == "1")
{ {
var commitFile = Path.Combine(repoArtifacts, "commit"); var commitFile = Path.Combine(repoArtifacts, "commit");
commits.TryAdd(repo, File.ReadAllLines(commitFile)[0]); if (File.Exists(commitFile))
{
commits.TryAdd(repo, File.ReadAllLines(commitFile)[0]);
}
} }
if (!string.IsNullOrEmpty(ciVolatileShare)) if (!string.IsNullOrEmpty(ciVolatileShare))