Handle missing jq command
This commit is contained in:
parent
1747739882
commit
3274a8dd09
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,8 @@ def comparefiles(importedjsonfile, currentjsonfile) {
|
|||
env.CURRENT_JSON="${currentjsonfile}"
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
which jq
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
# jq -S sorts json output
|
||||
diff -c <(jq -S . "${IMPORTED_JSON}") <(jq -S . "${CURRENT_JSON}")
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue