This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new e0fc5320 fix: properly parse cmake version (#1043)
e0fc5320 is described below

commit e0fc53203126eb031667a78fa9ea90dea197016e
Author: tison <[email protected]>
AuthorDate: Tue Oct 25 20:37:52 2022 +0800

    fix: properly parse cmake version (#1043)
    
    This closes #1042.
    
    Signed-off-by: tison <[email protected]>
---
 x.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x.py b/x.py
index 99d3e5e8..2a7cc455 100755
--- a/x.py
+++ b/x.py
@@ -95,7 +95,7 @@ def build(dir: str, jobs: int, ghproxy: bool, ninja: bool, 
unittest: bool, compi
 
     output = run_pipe(cmake, "-version")
     output = run_pipe("head", "-n", "1", stdin=output)
-    output = run_pipe("sed", "s/[^0-9.]*//g", stdin=output)
+    output = run_pipe("awk", "{print $(NF)}", stdin=output)
     cmake_version = output.read().strip()
     check_version(cmake_version, CMAKE_REQUIRE_VERSION, "CMake")
 

Reply via email to