mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
build: only manipulate out if getting the timestamp was successful
This fixes an issue seen in #1548, though the real problem is something different.
This commit is contained in:
parent
143833872b
commit
cf1939aab3
@ -158,11 +158,12 @@ function(git_timestamp _var)
|
||||
OUTPUT_VARIABLE out
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
set(out "${out}-${res}-NOTFOUND")
|
||||
endif()
|
||||
if(res EQUAL 0)
|
||||
string(REGEX REPLACE "[-\" :]" "" out ${out})
|
||||
string(SUBSTRING ${out} 0 12 out)
|
||||
else()
|
||||
set(out "${out}-${res}-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set(${_var} ${out} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user