Loading common-openapi/cli-validate-openapis-mec.sh +3 −5 Original line number Original line Diff line number Diff line Loading @@ -45,11 +45,9 @@ function validate { } } echo -e "\n------ Validating all YAML files (may takes several minutes) ------" echo -e "\n------ Validating all YAML files (may takes several minutes) ------" # If there are no YAML file, simply exit # If there are no YAML files nor JSON files, simply exit ls | grep -q yaml if ! ls | grep -Eq '\.ya?ml$|\.json$'; then found_yaml=$? echo "-- No YAML or JSON files." if [ ! $found_yaml ] ; then echo "-- No YAML files." exit 0 exit 0 fi fi Loading Loading
common-openapi/cli-validate-openapis-mec.sh +3 −5 Original line number Original line Diff line number Diff line Loading @@ -45,11 +45,9 @@ function validate { } } echo -e "\n------ Validating all YAML files (may takes several minutes) ------" echo -e "\n------ Validating all YAML files (may takes several minutes) ------" # If there are no YAML file, simply exit # If there are no YAML files nor JSON files, simply exit ls | grep -q yaml if ! ls | grep -Eq '\.ya?ml$|\.json$'; then found_yaml=$? echo "-- No YAML or JSON files." if [ ! $found_yaml ] ; then echo "-- No YAML files." exit 0 exit 0 fi fi Loading