From 15ed0bb344f5fe998e934c093e416837ee1ee811 Mon Sep 17 00:00:00 2001 From: David Shanske Date: Wed, 13 Nov 2024 05:48:04 +0000 Subject: [PATCH] Fix again --- bin/install-cp-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-cp-tests.sh b/bin/install-cp-tests.sh index 4e49992..8821d5b 100755 --- a/bin/install-cp-tests.sh +++ b/bin/install-cp-tests.sh @@ -43,7 +43,7 @@ if [[ "$CP_VERSION" == latest ]]; then download \ https://api.github.com/repos/ClassicPress/ClassicPress-release/releases/latest \ "$TMPDIR/cp-latest.json" - CP_VERSION=$(grep -o '"tag_name":"[^"]*' $TMPDIR/cp-latest.json | sed 's/"tag_name":"//') + CP_VERSION="$(grep -Po '"tag_name":\s*"[^"]+"' "$TMPDIR/cp-latest.json" | cut -d'"' -f4)" if [ -z "$CP_VERSION" ]; then echo "ClassicPress version not detected correctly!"