summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBrett Holman <brett.holman@canonical.com>2022-11-10 14:41:01 -0700
committerGitHub <noreply@github.com>2022-11-10 15:41:01 -0600
commit4dfb6845f4f2201b3f53720fad1fa351a9270388 (patch)
treef67c969659aafa88a12cbf9a70d35a2260327152 /tools
parent60e2b2845b7a28a3bfecf42901380faedcfc751c (diff)
downloadcloud-init-git-4dfb6845f4f2201b3f53720fad1fa351a9270388.tar.gz
ci: run json tool on 22.04 rather than 20.04 (#1823)
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check_json_format.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/check_json_format.sh b/tools/check_json_format.sh
index ac73dc42..62f7d6cd 100755
--- a/tools/check_json_format.sh
+++ b/tools/check_json_format.sh
@@ -5,8 +5,7 @@
# requires python 3.9 for --indent
#
file=$1
-before=$(cat "$file")
-python3 -m json.tool --indent 2 "$file" "$file"
-after=$(cat "$file")
-test "$before" = "$after"
-exit $?
+before=$(cat "$file") &&
+ python3 -m json.tool --indent 2 "$file" "$file" &&
+ after=$(cat "$file") &&
+ test "$before" = "$after"