From 533f373936874fc84e07d7e097e4e6d2ffe52d99 Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Fri, 6 Dec 2024 15:05:39 +0530 Subject: [PATCH] change version command regex Signed-off-by: nitin sanghi --- habitat/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/habitat/tests/test.sh b/habitat/tests/test.sh index e9d7438c..d5d01cdc 100755 --- a/habitat/tests/test.sh +++ b/habitat/tests/test.sh @@ -21,7 +21,7 @@ cd "${project_root}" echo "Testing ${pkg_ident} executables" version=$(hab pkg exec "${pkg_ident}" chef-cli -v) echo $version -actual_version=$(echo "$version" | grep -Po ([0-9]+\.[0-9]+\.[0-9]+)) +actual_version=$(echo "$version" | sed -E 's/.*version: ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') echo $actual_version if [[ "$actual_version" != *"$package_version"* ]]; then