From 98750bbce5a74530c048c253ebeed406e0cba103 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Thu, 4 Jan 2024 16:21:40 -0700 Subject: [PATCH] Strip the whitespace from git command (#597) For some reason, mockprogram.py prints an newline that raw git does not. But this should work for raw git too. --- tribits/core/package_arch/TribitsGitRepoVersionInfo.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tribits/core/package_arch/TribitsGitRepoVersionInfo.cmake b/tribits/core/package_arch/TribitsGitRepoVersionInfo.cmake index a6622d501..80b82ed9f 100644 --- a/tribits/core/package_arch/TribitsGitRepoVersionInfo.cmake +++ b/tribits/core/package_arch/TribitsGitRepoVersionInfo.cmake @@ -120,6 +120,7 @@ function(tribits_generate_single_repo_version_string gitRepoDir WORKING_DIRECTORY ${gitRepoDir} RESULT_VARIABLE gitCmndRtn OUTPUT_VARIABLE gitCmndOutput + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ) if (NOT gitCmndRtn STREQUAL 0) @@ -137,6 +138,7 @@ function(tribits_generate_single_repo_version_string gitRepoDir WORKING_DIRECTORY ${gitRepoDir} RESULT_VARIABLE gitCmndRtn OUTPUT_VARIABLE gitCmndOutput + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ) if (NOT gitCmndRtn STREQUAL 0)