Browse code

Now check for length on error array

oatmealraisin authored on 2016/08/19 02:35:13
Showing 1 changed files
... ...
@@ -240,7 +240,7 @@ func extractGitSource(gitClient GitClient, gitSource *api.GitBuildSource, revisi
240 240
 	}
241 241
 
242 242
 	if glog.Is(0) {
243
-		if information, gitErr := gitClient.GetInfo(dir); gitErr == nil {
243
+		if information, gitErr := gitClient.GetInfo(dir); len(gitErr) == 0 {
244 244
 			glog.Infof("\tCommit:\t%s (%s)\n", information.CommitID, information.Message)
245 245
 			glog.Infof("\tAuthor:\t%s <%s>\n", information.AuthorName, information.AuthorEmail)
246 246
 			glog.Infof("\tDate:\t%s\n", information.Date)