From 7b017863c2b32c698e419acd9ab0c6eb13020e77 Mon Sep 17 00:00:00 2001 From: Fabian Burth Date: Tue, 24 Oct 2023 15:18:37 +0200 Subject: [PATCH] fix plugin test on mac --- pkg/contexts/ocm/accessmethods/plugin/testdata/test | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/contexts/ocm/accessmethods/plugin/testdata/test b/pkg/contexts/ocm/accessmethods/plugin/testdata/test index 7fb0ca6c71..566e080ff1 100755 --- a/pkg/contexts/ocm/accessmethods/plugin/testdata/test +++ b/pkg/contexts/ocm/accessmethods/plugin/testdata/test @@ -20,12 +20,13 @@ extract() { setfield() { local v - v="$(echo "$BASE" | sed 's/"'"$1"'": *"[^"]*"/"'""$1""'":"'"${2//\//\\\/}"'"/')" + s="$(echo "$2" | sed 's/\//\\\//g')" + v="$(echo "$BASE" | sed 's/"'"$1"'": *"[^"]*"/"'"$1"'":"'"$s"'"/')" if [ "$v" == "$BASE" ]; then - v="$(echo "$BASE" | sed 's/^{"/{"'"$1"'":"'"${2//\//\\\/}"'","/')" + v="$(echo "$BASE" | sed 's/^{"/{"'"$1"'":"'"$s"'","/')" fi if [ "$v" == "$BASE" ]; then - v="$(echo "$BASE" | sed 's/^{/{"'"$1"'":"'"${2//\//\\\/}"'"/')" + v="$(echo "$BASE" | sed 's/^{/{"'"$1"'":"'"$s"'"/')" fi BASE="$v" }