Skip to content

Commit

Permalink
Guard against GIT_COMMIT_MESSAGE begin empty
Browse files Browse the repository at this point in the history
References #15.
  • Loading branch information
urdh authored and JoakimSoderberg committed Apr 2, 2016
1 parent 127e0bb commit e37d5b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/CoverallsGenerateGcov.cmake
Expand Up @@ -131,7 +131,9 @@ if (GIT_FOUND)
git_log_format(B GIT_COMMIT_MESSAGE)
git_log_format(H GIT_COMMIT_HASH)

string(REPLACE "\n" "\\n" GIT_COMMIT_MESSAGE ${GIT_COMMIT_MESSAGE})
if(GIT_COMMIT_MESSAGE)
string(REPLACE "\n" "\\n" GIT_COMMIT_MESSAGE ${GIT_COMMIT_MESSAGE})
endif()

message("Git exe: ${GIT_EXECUTABLE}")
message("Git branch: ${GIT_BRANCH}")
Expand Down

0 comments on commit e37d5b8

Please sign in to comment.