File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ set -o nounset
5
5
set -o pipefail
6
6
7
7
# use homebrew cut if installed
8
- if [[ -d " /usr/local/opt/coreutils/libexec/gnubin" ]]; then
9
- PATH=" /usr/local/opt/coreutils/libexec/gnubin:${PATH} "
8
+ HOMEBREW_PREFIX=" $( brew --prefix) "
9
+ if [[ -d " ${HOMEBREW_PREFIX} /opt/coreutils/libexec/gnubin" ]]; then
10
+ PATH=" ${HOMEBREW_PREFIX} /opt/coreutils/libexec/gnubin:${PATH} "
10
11
fi
11
12
12
13
function crd_to_json_schema() {
@@ -41,7 +42,7 @@ function crd_to_json_schema() {
41
42
echo " apiextensions: ${api_version} documentIndex: ${document} | kind: ${kind} crd_kind: ${crd_kind} crd_group: ${crd_group} "
42
43
crd_version=$( yq eval " select(documentIndex == ${document} ) | .spec.version" " ${input} " )
43
44
if [ -n " ${crd_version} " ]; then
44
- yq eval --prettyPrint --tojson " select(documentIndex == ${document} ) | .spec.validation.openAPIV3Schema" " ${input} " | write_schema " ${crd_kind} -${crd_group} -${crd_version} .json"
45
+ yq eval --prettyPrint -o json " select(documentIndex == ${document} ) | .spec.validation.openAPIV3Schema" " ${input} " | write_schema " ${crd_kind} -${crd_group} -${crd_version} .json"
45
46
else
46
47
for crd_version in $( yq eval " select(documentIndex == ${document} ) | .spec.versions[].name" " ${input} " ) ; do
47
48
yq eval --prettyPrint -o json " select(documentIndex == ${document} ) | .spec.validation.openAPIV3Schema" " ${input} " | write_schema " ${crd_kind} -${crd_group} -${crd_version} .json"
You can’t perform that action at this time.
0 commit comments