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
|
OUTPUT_VARIABLE out
|
||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
if(NOT res EQUAL 0)
|
if(res EQUAL 0)
|
||||||
set(out "${out}-${res}-NOTFOUND")
|
|
||||||
endif()
|
|
||||||
string(REGEX REPLACE "[-\" :]" "" out ${out})
|
string(REGEX REPLACE "[-\" :]" "" out ${out})
|
||||||
string(SUBSTRING ${out} 0 12 out)
|
string(SUBSTRING ${out} 0 12 out)
|
||||||
|
else()
|
||||||
|
set(out "${out}-${res}-NOTFOUND")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(${_var} ${out} PARENT_SCOPE)
|
set(${_var} ${out} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
Loading…
Reference in New Issue
Block a user