File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -61,23 +61,8 @@ required=(
6161
6262missing=()
6363for p in " ${required[@]} " ; do
64- # split dot-separated path into array elements and build a jq array literal
65- IFS=' .' read -r -a parts <<< " $p"
66- # build JSON array like ["a","b"]
67- jq_array=" ["
68- first=1
69- for part in " ${parts[@]} " ; do
70- if [[ $first -eq 1 ]]; then
71- jq_array+=" \" ${part} \" "
72- first=0
73- else
74- jq_array+=" ,\" ${part} \" "
75- fi
76- done
77- jq_array+=" ]"
78-
79- # Test presence: use getpath(array) and check that it exists and is not null
80- if ! jq -e " getpath($jq_array ) != null" " $manifest " > /dev/null 2>&1 ; then
64+ # Test presence: use getpath(split(".")) and check that it exists and is not null
65+ if ! jq -e --arg p " $p " ' getpath($p | split(".")) != null' " $manifest " > /dev/null 2>&1 ; then
8166 missing+=(" $p " )
8267 fi
8368done
You can’t perform that action at this time.
0 commit comments