From 26dab9f0f52816856bd002634a52bf29d957b4b5 Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 14 Apr 2023 09:45:51 +0200 Subject: [PATCH] chore(#7): surround if condition with quotes --- .github/workflows/data-json-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/data-json-test.yml b/.github/workflows/data-json-test.yml index 3ccf9ecc..641cc774 100644 --- a/.github/workflows/data-json-test.yml +++ b/.github/workflows/data-json-test.yml @@ -40,11 +40,11 @@ jobs: if [ '${{ steps.data-node-setup.outputs.data-lap-json }}' == '' ]; then echo "Output must not be empty"; exit 1; fi - if [ $(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq -e 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") | if . then 1 else 0 end') -eq 1 ]; then + if [ "$(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq -e 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") | if . then 1 else 0 end')" -eq 1 ]; then echo "output has correct structure" else echo "output has wrong structure" - exit 1; + exit 1 fi if [ $(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq -e '.label == "node setup" | if . then 1 else 0 end') -eq 1 ]; then echo "value of 'label' is 'node setup'"