Skip to content

Commit

Permalink
fix plugin test on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianburth committed Oct 24, 2023
1 parent 26dad4c commit 7b01786
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/contexts/ocm/accessmethods/plugin/testdata/test
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 7b01786

Please sign in to comment.